Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90272
b: refs/heads/master
c: f145049
h: refs/heads/master
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Mar 24, 2008
1 parent 5e7637d commit b6730b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0be43f82c4f4c4a999b53cf794513f7f1a4ed7f3
refs/heads/master: f145049a06f470d0489f47cb83ff3ccb2a0de622
3 changes: 2 additions & 1 deletion trunk/include/net/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ struct net_protocol {
int (*gso_send_check)(struct sk_buff *skb);
struct sk_buff *(*gso_segment)(struct sk_buff *skb,
int features);
int no_policy;
unsigned int no_policy:1,
netns_ok:1;
};

#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/ipv4/ip_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ int ip_call_ra_chain(struct sk_buff *skb)

static int ip_local_deliver_finish(struct sk_buff *skb)
{
struct net *net = skb->dev->nd_net;

__skb_pull(skb, ip_hdrlen(skb));

/* Point into the IP datagram, just past the header. */
Expand All @@ -214,7 +216,8 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
raw = raw_local_deliver(skb, protocol);

hash = protocol & (MAX_INET_PROTOS - 1);
if ((ipprot = rcu_dereference(inet_protos[hash])) != NULL) {
ipprot = rcu_dereference(inet_protos[hash]);
if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) {
int ret;

if (!ipprot->no_policy) {
Expand Down Expand Up @@ -375,9 +378,6 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
struct iphdr *iph;
u32 len;

if (dev->nd_net != &init_net)
goto drop;

/* When the interface is in promisc. mode, drop all the crap
* that it receives, do not try to analyse it.
*/
Expand Down

0 comments on commit b6730b6

Please sign in to comment.