diff options
author | paul <paul> | 2007-04-10 19:43:43 +0000 |
---|---|---|
committer | paul <paul> | 2007-04-10 19:43:43 +0000 |
commit | dffe9094e80837d1f7bd68e124a891dd9e4f1d9f (patch) | |
tree | 44f8ba74bedac8fcc70556fb8f1e888e5e85a353 | |
parent | c241e394181c4fa82d8f2cb6319f2003283ef8bf (diff) | |
download | quagga-dffe9094e80837d1f7bd68e124a891dd9e4f1d9f.tar.bz2 quagga-dffe9094e80837d1f7bd68e124a891dd9e4f1d9f.tar.xz |
[zebra] MTU change should propogate to zserv client on BSD/Solaris
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.
-rw-r--r-- | zebra/ChangeLog | 5 | ||||
-rw-r--r-- | zebra/ioctl.c | 3 | ||||
-rw-r--r-- | zebra/ioctl_solaris.c | 12 |
3 files changed, 19 insertions, 1 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 54550467..c00ede3c 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -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 diff --git a/zebra/ioctl.c b/zebra/ioctl.c index 06be5bec..ccb927ac 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -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; diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c index 2f05bf12..f68ea56e 100644 --- a/zebra/ioctl_solaris.c +++ b/zebra/ioctl_solaris.c @@ -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 */ } |