patch-2.4.21 linux-2.4.21/net/ipv6/ip6_fib.c

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

diff -urN linux-2.4.20/net/ipv6/ip6_fib.c linux-2.4.21/net/ipv6/ip6_fib.c
@@ -423,7 +423,8 @@
  *	Insert routing information in a node.
  */
 
-static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt)
+static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
+    struct nlmsghdr *nlh)
 {
 	struct rt6_info *iter = NULL;
 	struct rt6_info **ins;
@@ -481,7 +482,7 @@
 	*ins = rt;
 	rt->rt6i_node = fn;
 	atomic_inc(&rt->rt6i_ref);
-	inet6_rt_notify(RTM_NEWROUTE, rt);
+	inet6_rt_notify(RTM_NEWROUTE, rt, nlh);
 	rt6_stats.fib_rt_entries++;
 
 	if ((fn->fn_flags & RTN_RTINFO) == 0) {
@@ -505,7 +506,7 @@
  *	with source addr info in sub-trees
  */
 
-int fib6_add(struct fib6_node *root, struct rt6_info *rt)
+int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nlmsghdr *nlh)
 {
 	struct fib6_node *fn;
 	int err = -ENOMEM;
@@ -578,7 +579,7 @@
 	}
 #endif
 
-	err = fib6_add_rt2node(fn, rt);
+	err = fib6_add_rt2node(fn, rt, nlh);
 
 	if (err == 0) {
 		fib6_start_gc(rt);
@@ -886,7 +887,8 @@
 	}
 }
 
-static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp)
+static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
+    struct nlmsghdr *nlh)
 {
 	struct fib6_walker_t *w;
 	struct rt6_info *rt = *rtp;
@@ -941,11 +943,11 @@
 		if (atomic_read(&rt->rt6i_ref) != 1) BUG();
 	}
 
-	inet6_rt_notify(RTM_DELROUTE, rt);
+	inet6_rt_notify(RTM_DELROUTE, rt, nlh);
 	rt6_release(rt);
 }
 
-int fib6_del(struct rt6_info *rt)
+int fib6_del(struct rt6_info *rt, struct nlmsghdr *nlh)
 {
 	struct fib6_node *fn = rt->rt6i_node;
 	struct rt6_info **rtp;
@@ -970,7 +972,7 @@
 
 	for (rtp = &fn->leaf; *rtp; rtp = &(*rtp)->u.next) {
 		if (*rtp == rt) {
-			fib6_del_route(fn, rtp);
+			fib6_del_route(fn, rtp, nlh);
 			return 0;
 		}
 	}
@@ -1099,7 +1101,7 @@
 		res = c->func(rt, c->arg);
 		if (res < 0) {
 			w->leaf = rt;
-			res = fib6_del(rt);
+			res = fib6_del(rt, NULL);
 			if (res) {
 #if RT6_DEBUG >= 2
 				printk(KERN_DEBUG "fib6_clean_node: del failed: rt=%p@%p err=%d\n", rt, rt->rt6i_node, res);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)