]> git.puffer.fish Git - mirror/frr.git/commitdiff
[zebra] MTU change should propogate to zserv client on BSD/Solaris
authorPaul Jakma <paul.jakma@sun.com>
Tue, 10 Apr 2007 19:43:43 +0000 (19:43 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Tue, 10 Apr 2007 19:43:43 +0000 (19:43 +0000)
2007-04-10 Paul Jakma <paul.jakma@sun.com>

* ioctl{_solaris,}.c: (if_get_mtu) Ping clients via
          zebra_interface_up_update if MTU is changed.

zebra/ChangeLog
zebra/ioctl.c
zebra/ioctl_solaris.c

index 54550467eebe181415639d7bf015186302d608df..c00ede3c4a2e809f516806edfc578b251c18a7dc 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-10 Paul Jakma <paul.jakma@sun.com>
+
+       * ioctl{_solaris,}.c: (if_get_mtu) Ping clients via
+          zebra_interface_up_update if MTU is changed.
+
 2007-04-08 Paul Jakma <paul.jakma@sun.com>
 
        * {ioctl,kernel}_null.c: Install of IP address should
index 06be5bec9987ca46ee919010834104ea27dd1f1c..ccb927accf701d9c69344405d8d754688c8c12d5 100644 (file)
@@ -155,6 +155,9 @@ if_get_mtu (struct interface *ifp)
   ifp->mtu6 = ifp->mtu = ifreq.ifr_mtu;
 #endif /* SUNOS_5 */
 
+  /* propogate */
+  zebra_interface_up_update(ifp);
+
 #else
   zlog (NULL, LOG_INFO, "Can't lookup mtu on this system");
   ifp->mtu6 = ifp->mtu = -1;
index 2f05bf127c19f607e7a09146ccc237fb2c789225..f68ea56eb7209e151020c5dd455de46e501d1b5f 100644 (file)
@@ -156,6 +156,7 @@ if_get_mtu (struct interface *ifp)
 {
   struct lifreq lifreq;
   int ret;
+  u_char changed = 0;
   
   if (ifp->flags & IFF_IPV4)
     {
@@ -170,12 +171,17 @@ if_get_mtu (struct interface *ifp)
       else
         {
           ifp->mtu = lifreq.lifr_metric;
+          changed = 1;
         }
     }
 
 #ifdef HAVE_IPV6
   if ((ifp->flags & IFF_IPV6) == 0)
-    return;
+    {
+      if (changed)
+        zebra_interface_up_update(ifp);
+      return;
+    }
     
   memset(&lifreq, 0, sizeof(lifreq));
   lifreq_set_name (&lifreq, ifp->name);
@@ -189,7 +195,11 @@ if_get_mtu (struct interface *ifp)
   else
     {
       ifp->mtu6 = lifreq.lifr_metric;
+      changed = 1
     }
+  
+  if (changed)
+    zebra_interface_up_update(ifp);
 #endif /* HAVE_IPV6 */
 }