diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-10 02:22:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 02:22:21 -0500 |
commit | 0ecc103aec454288cbaa5a33d8960ab3467e8a11 (patch) | |
tree | d911ae41c303a575913b8aca2a49f4acaaf0fc93 /net | |
parent | 0012985d184b7b9d4513eacd35771715471e06ef (diff) | |
parent | 4906f9985e310fc01f956256b0d58ac28b0dcb19 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/gianfar.c
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_forward.c | 7 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 25 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 15 | ||||
-rw-r--r-- | net/netfilter/xt_sctp.c | 2 |
5 files changed, 44 insertions, 7 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index bdd9ccea17ce..d2c27c808d3b 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -67,6 +67,11 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | |||
67 | { | 67 | { |
68 | struct net_device *indev; | 68 | struct net_device *indev; |
69 | 69 | ||
70 | if (skb_warn_if_lro(skb)) { | ||
71 | kfree_skb(skb); | ||
72 | return; | ||
73 | } | ||
74 | |||
70 | indev = skb->dev; | 75 | indev = skb->dev; |
71 | skb->dev = to->dev; | 76 | skb->dev = to->dev; |
72 | skb_forward_csum(skb); | 77 | skb_forward_csum(skb); |
@@ -89,7 +94,7 @@ void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) | |||
89 | /* called with rcu_read_lock */ | 94 | /* called with rcu_read_lock */ |
90 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | 95 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) |
91 | { | 96 | { |
92 | if (!skb_warn_if_lro(skb) && should_deliver(to, skb)) { | 97 | if (should_deliver(to, skb)) { |
93 | __br_forward(to, skb); | 98 | __br_forward(to, skb); |
94 | return; | 99 | return; |
95 | } | 100 | } |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 58e2b0d93758..d994c55a5b16 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -249,8 +249,8 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | t = netdev_priv(dev); | 251 | t = netdev_priv(dev); |
252 | ip6_tnl_dev_init(dev); | ||
253 | t->parms = *p; | 252 | t->parms = *p; |
253 | ip6_tnl_dev_init(dev); | ||
254 | 254 | ||
255 | if ((err = register_netdevice(dev)) < 0) | 255 | if ((err = register_netdevice(dev)) < 0) |
256 | goto failed_free; | 256 | goto failed_free; |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index c455cf4ee756..c323643ffcf9 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -49,8 +49,19 @@ static bool icmpv6_pkt_to_tuple(const struct sk_buff *skb, | |||
49 | static const u_int8_t invmap[] = { | 49 | static const u_int8_t invmap[] = { |
50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, | 50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, |
51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, | 51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, |
52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_QUERY + 1, | 52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_REPLY + 1, |
53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_REPLY +1 | 53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_QUERY +1 |
54 | }; | ||
55 | |||
56 | static const u_int8_t noct_valid_new[] = { | ||
57 | [ICMPV6_MGM_QUERY - 130] = 1, | ||
58 | [ICMPV6_MGM_REPORT -130] = 1, | ||
59 | [ICMPV6_MGM_REDUCTION - 130] = 1, | ||
60 | [NDISC_ROUTER_SOLICITATION - 130] = 1, | ||
61 | [NDISC_ROUTER_ADVERTISEMENT - 130] = 1, | ||
62 | [NDISC_NEIGHBOUR_SOLICITATION - 130] = 1, | ||
63 | [NDISC_NEIGHBOUR_ADVERTISEMENT - 130] = 1, | ||
64 | [ICMPV6_MLD2_REPORT - 130] = 1 | ||
54 | }; | 65 | }; |
55 | 66 | ||
56 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, | 67 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, |
@@ -178,6 +189,7 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
178 | { | 189 | { |
179 | const struct icmp6hdr *icmp6h; | 190 | const struct icmp6hdr *icmp6h; |
180 | struct icmp6hdr _ih; | 191 | struct icmp6hdr _ih; |
192 | int type; | ||
181 | 193 | ||
182 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); | 194 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); |
183 | if (icmp6h == NULL) { | 195 | if (icmp6h == NULL) { |
@@ -194,6 +206,15 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
194 | return -NF_ACCEPT; | 206 | return -NF_ACCEPT; |
195 | } | 207 | } |
196 | 208 | ||
209 | type = icmp6h->icmp6_type - 130; | ||
210 | if (type >= 0 && type < sizeof(noct_valid_new) && | ||
211 | noct_valid_new[type]) { | ||
212 | skb->nfct = &nf_conntrack_untracked.ct_general; | ||
213 | skb->nfctinfo = IP_CT_NEW; | ||
214 | nf_conntrack_get(skb->nfct); | ||
215 | return NF_ACCEPT; | ||
216 | } | ||
217 | |||
197 | /* is not error message ? */ | 218 | /* is not error message ? */ |
198 | if (icmp6h->icmp6_type >= 128) | 219 | if (icmp6h->icmp6_type >= 128) |
199 | return NF_ACCEPT; | 220 | return NF_ACCEPT; |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index c32a7e8e3a1b..cb78aa00399e 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -434,7 +434,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
434 | } else | 434 | } else |
435 | return NOTIFY_DONE; | 435 | return NOTIFY_DONE; |
436 | 436 | ||
437 | if (!nfnetlink_has_listeners(group)) | 437 | if (!item->report && !nfnetlink_has_listeners(group)) |
438 | return NOTIFY_DONE; | 438 | return NOTIFY_DONE; |
439 | 439 | ||
440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
@@ -1215,6 +1215,16 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1215 | } | 1215 | } |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | #ifdef CONFIG_NF_NAT_NEEDED | ||
1219 | if (cda[CTA_NAT_SEQ_ADJ_ORIG] || cda[CTA_NAT_SEQ_ADJ_REPLY]) { | ||
1220 | err = ctnetlink_change_nat_seq_adj(ct, cda); | ||
1221 | if (err < 0) { | ||
1222 | rcu_read_unlock(); | ||
1223 | goto err; | ||
1224 | } | ||
1225 | } | ||
1226 | #endif | ||
1227 | |||
1218 | if (cda[CTA_PROTOINFO]) { | 1228 | if (cda[CTA_PROTOINFO]) { |
1219 | err = ctnetlink_change_protoinfo(ct, cda); | 1229 | err = ctnetlink_change_protoinfo(ct, cda); |
1220 | if (err < 0) { | 1230 | if (err < 0) { |
@@ -1492,7 +1502,8 @@ static int ctnetlink_expect_event(struct notifier_block *this, | |||
1492 | } else | 1502 | } else |
1493 | return NOTIFY_DONE; | 1503 | return NOTIFY_DONE; |
1494 | 1504 | ||
1495 | if (!nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | 1505 | if (!item->report && |
1506 | !nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | ||
1496 | return NOTIFY_DONE; | 1507 | return NOTIFY_DONE; |
1497 | 1508 | ||
1498 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 1509 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index e223cb43ae8e..a189ada9128f 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb, | |||
105 | 105 | ||
106 | switch (chunk_match_type) { | 106 | switch (chunk_match_type) { |
107 | case SCTP_CHUNK_MATCH_ALL: | 107 | case SCTP_CHUNK_MATCH_ALL: |
108 | return SCTP_CHUNKMAP_IS_CLEAR(info->chunkmap); | 108 | return SCTP_CHUNKMAP_IS_CLEAR(chunkmapcopy); |
109 | case SCTP_CHUNK_MATCH_ANY: | 109 | case SCTP_CHUNK_MATCH_ANY: |
110 | return false; | 110 | return false; |
111 | case SCTP_CHUNK_MATCH_ONLY: | 111 | case SCTP_CHUNK_MATCH_ONLY: |