|
@@ -160,6 +160,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
|
|
struct ip_ra_chain *ra;
|
|
struct ip_ra_chain *ra;
|
|
u8 protocol = ip_hdr(skb)->protocol;
|
|
u8 protocol = ip_hdr(skb)->protocol;
|
|
struct sock *last = NULL;
|
|
struct sock *last = NULL;
|
|
|
|
+ struct net_device *dev = skb->dev;
|
|
|
|
|
|
read_lock(&ip_ra_lock);
|
|
read_lock(&ip_ra_lock);
|
|
for (ra = ip_ra_chain; ra; ra = ra->next) {
|
|
for (ra = ip_ra_chain; ra; ra = ra->next) {
|
|
@@ -170,7 +171,8 @@ int ip_call_ra_chain(struct sk_buff *skb)
|
|
*/
|
|
*/
|
|
if (sk && inet_sk(sk)->num == protocol &&
|
|
if (sk && inet_sk(sk)->num == protocol &&
|
|
(!sk->sk_bound_dev_if ||
|
|
(!sk->sk_bound_dev_if ||
|
|
- sk->sk_bound_dev_if == skb->dev->ifindex)) {
|
|
|
|
|
|
+ sk->sk_bound_dev_if == dev->ifindex) &&
|
|
|
|
+ sk->sk_net == dev->nd_net) {
|
|
if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
|
|
if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
|
|
if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) {
|
|
if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) {
|
|
read_unlock(&ip_ra_lock);
|
|
read_unlock(&ip_ra_lock);
|
|
@@ -286,7 +288,7 @@ static inline int ip_rcv_options(struct sk_buff *skb)
|
|
opt = &(IPCB(skb)->opt);
|
|
opt = &(IPCB(skb)->opt);
|
|
opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
|
|
opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
|
|
|
|
|
|
- if (ip_options_compile(&init_net, opt, skb)) {
|
|
|
|
|
|
+ if (ip_options_compile(dev->nd_net, opt, skb)) {
|
|
IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
|
|
IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
|
|
goto drop;
|
|
goto drop;
|
|
}
|
|
}
|