]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: remove useless iotcl linux calls
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 13 Dec 2017 15:50:16 +0000 (16:50 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 13 Dec 2017 15:54:10 +0000 (16:54 +0100)
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>
zebra/ioctl.c

index b5ed3ede9714414339f9da1d1821fb6d0f68ed28..8e3a1d1a036307ea1d024dda8124579556a8dc42 100644 (file)
@@ -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