diff -urw linux-3.18.7-200.fc21.x86_64/net/ipv6/ndisc.c linux-3.18.7-200.fc21.x86_64/net/ipv6/ndisc.c --- linux-3.18.7-200.fc21.x86_64/net/ipv6/ndisc.c 2015-03-08 13:01:36.567000000 -0400 +++ linux-3.18.7-200.fc21.x86_64/net/ipv6/ndisc.c 2015-03-08 12:50:55.446000000 -0400 @@ -1215,7 +1215,15 @@ if (rt) rt6_set_expires(rt, jiffies + (HZ * lifetime)); if (ra_msg->icmph.icmp6_hop_limit) { + /* + * Only set hop_limit on the interface if it is higher than the current hop_limit. + * Prevents silly routes with hop_limit 1 from affecting everyone. + */ + if (in6_dev->cnf.hop_limit < ra_msg->icmph.icmp6_hop_limit) { in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit; + } else { + ND_PRINTK(2, warn, "RA: Got route advertisement with lower hop_limit than current\n"); + } if (rt) dst_metric_set(&rt->dst, RTAX_HOPLIMIT, ra_msg->icmph.icmp6_hop_limit);