NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/47419: ifconfig on a gif(4) interface doesn't display the MTU



>Number:         47419
>Category:       kern
>Synopsis:       ifconfig on a gif(4) interface doesn't display the MTU
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 08 00:25:00 +0000 2013
>Originator:     Anthony Mallet
>Release:        -current
>Organization:
>Environment:
NetBSD cactus 6.99.16 NetBSD 6.99.16 (CACTUS) #26: Tue Jan  8 01:14:43 CET 2013
>Description:
ifconfig on a gif(4) does not display the MTU.

The attached patch fixes this for me. It deletes the driver specific
handling of the SIOCGIFMTU ioctl() and let ifioctl_common() handle it,
as there is no driver specific action to be done.

>How-To-Repeat:

ifconfig gif0 | grep mtu


>Fix:
Index: if_gif.c
===================================================================
RCS file: /cvsroot/src/sys/net/if_gif.c,v
retrieving revision 1.80
diff -u -r1.80 if_gif.c
--- if_gif.c    28 Oct 2011 16:42:52 -0000      1.80
+++ if_gif.c    8 Jan 2013 00:18:06 -0000
@@ -496,9 +496,6 @@
                }
                break;
 
-       case SIOCGIFMTU:
-               break;
-
        case SIOCSIFMTU:
                if (ifr->ifr_mtu < GIF_MTU_MIN || ifr->ifr_mtu > GIF_MTU_MAX)
                        return EINVAL;



Home | Main Index | Thread Index | Old Index