patch-2.1.56 linux/net/ipv6/route.c

Next file: linux/net/netlink.c
Previous file: linux/net/ipv6/ip6_output.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.55/linux/net/ipv6/route.c linux/net/ipv6/route.c
@@ -733,6 +733,25 @@
 
 int ip6_route_del(struct in6_rtmsg *rtmsg)
 {
+	struct rt6_info *rt;
+	struct device *dev=NULL;
+
+	/*
+	 *	Find device
+	 */
+	if(rtmsg->rtmsg_ifindex)
+		dev=dev_get_by_index(rtmsg->rtmsg_ifindex);
+	/*
+	 *	Find route
+	 */
+	rt=rt6_lookup(&rtmsg->rtmsg_dst, &rtmsg->rtmsg_src, dev, rtmsg->rtmsg_flags);
+	
+	/*
+	 *	Blow it away
+	 */
+	if(rt)
+		ip6_del_rt(rt);
+
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov