diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-12-13 16:50:16 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-12-13 16:54:10 +0100 |
| commit | 8aa416a6f3823ad1b5d5e778980f34b1f80db4ef (patch) | |
| tree | 59b14ccddbddb1ec575ba7201fa6979a8e1aecee /zebra/ioctl.c | |
| parent | e86b71f142b66ca0b74b5d392ea537fd3a30f33c (diff) | |
zebra: remove useless iotcl linux calls
As netlink is available for all linux systems ( old linux distributions
are not considered), this commit removes the ipv6 ioctl support for
linux.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/ioctl.c')
| -rw-r--r-- | zebra/ioctl.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/zebra/ioctl.c b/zebra/ioctl.c index b5ed3ede97..8e3a1d1a03 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -467,46 +467,14 @@ int if_prefix_add_ipv6(struct interface *ifp, struct connected *ifc) { #ifdef HAVE_NETLINK return kernel_address_add_ipv6 (ifp, ifc); -#else /* ! HAVE_NETLINK */ - int ret; - struct prefix_ipv6 *p; - struct in6_ifreq ifreq; - - p = (struct prefix_ipv6 *)ifc->address; - - memset(&ifreq, 0, sizeof(struct in6_ifreq)); - - memcpy(&ifreq.ifr6_addr, &p->prefix, sizeof(struct in6_addr)); - ifreq.ifr6_ifindex = ifp->ifindex; - ifreq.ifr6_prefixlen = p->prefixlen; - - ret = if_ioctl_ipv6(SIOCSIFADDR, (caddr_t)&ifreq); - - return ret; -#endif /* ! HAVE_NETLINK */ +#endif /* HAVE_NETLINK */ } int if_prefix_delete_ipv6(struct interface *ifp, struct connected *ifc) { #ifdef HAVE_NETLINK return kernel_address_delete_ipv6 (ifp, ifc); -#else /* ! HAVE_NETLINK */ - int ret; - struct prefix_ipv6 *p; - struct in6_ifreq ifreq; - - p = (struct prefix_ipv6 *)ifc->address; - - memset(&ifreq, 0, sizeof(struct in6_ifreq)); - - memcpy(&ifreq.ifr6_addr, &p->prefix, sizeof(struct in6_addr)); - ifreq.ifr6_ifindex = ifp->ifindex; - ifreq.ifr6_prefixlen = p->prefixlen; - - ret = if_ioctl_ipv6(SIOCDIFADDR, (caddr_t)&ifreq); - - return ret; -#endif /* ! HAVE_NETLINK */ +#endif /* HAVE_NETLINK */ } #else /* LINUX_IPV6 */ #ifdef HAVE_STRUCT_IN6_ALIASREQ |
