patch-2.2.4 linux/net/ipv6/ndisc.c

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

diff -u --recursive --new-file v2.2.3/linux/net/ipv6/ndisc.c linux/net/ipv6/ndisc.c
@@ -335,7 +335,7 @@
         msg->icmph.icmp6_unused = 0;
         msg->icmph.icmp6_router    = router;
         msg->icmph.icmp6_solicited = solicited;
-        msg->icmph.icmp6_override  = override;
+        msg->icmph.icmp6_override  = !!override;
 
         /* Set the target address. */
 	ipv6_addr_copy(&msg->target, solicited_addr);
@@ -497,7 +497,7 @@
 	 *	"The sender MUST return an ICMP
 	 *	 destination unreachable"
 	 */
-	icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
+	dst_link_failure(skb);
 	kfree_skb(skb);
 }
 
@@ -604,6 +604,13 @@
 			return;
 		}
 		neigh->flags |= NTF_ROUTER;
+
+		/*
+		 *	If we where using an "all destinations on link" route
+		 *	delete it
+		 */
+
+		rt6_purge_dflt_routers(RTF_ALLONLINK);
 	}
 
 	if (rt)
@@ -989,7 +996,7 @@
 
 					if (neigh) {
 						ndisc_send_na(dev, neigh, saddr, &msg->target,
-							      0, 0, inc, inc);
+							      0, 1, 0, inc);
 						neigh_release(neigh);
 					}
 				} else {
@@ -1173,7 +1180,6 @@
 	sk = ndisc_socket->sk;
 	sk->allocation = GFP_ATOMIC;
 	sk->net_pinfo.af_inet6.hop_limit = 255;
-	sk->net_pinfo.af_inet6.priority  = 15;
 	/* Do not loopback ndisc messages */
 	sk->net_pinfo.af_inet6.mc_loop = 0;
 	sk->num = 256;

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