aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index ee07aec215a0..9de83e6e0f1d 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -188,7 +188,13 @@ static inline int ip_finish_output2(struct sk_buff *skb)
188 skb = skb2; 188 skb = skb2;
189 } 189 }
190 190
191 nf_reset(skb); 191#ifdef CONFIG_BRIDGE_NETFILTER
192 /* bridge-netfilter defers calling some IP hooks to the bridge layer
193 * and still needs the conntrack reference.
194 */
195 if (skb->nf_bridge == NULL)
196#endif
197 nf_reset(skb);
192 198
193 if (hh) { 199 if (hh) {
194 int hh_alen; 200 int hh_alen;
@@ -383,7 +389,6 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
383 to->pkt_type = from->pkt_type; 389 to->pkt_type = from->pkt_type;
384 to->priority = from->priority; 390 to->priority = from->priority;
385 to->protocol = from->protocol; 391 to->protocol = from->protocol;
386 to->security = from->security;
387 dst_release(to->dst); 392 dst_release(to->dst);
388 to->dst = dst_clone(from->dst); 393 to->dst = dst_clone(from->dst);
389 to->dev = from->dev; 394 to->dev = from->dev;
@@ -1323,23 +1328,8 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
1323 ip_rt_put(rt); 1328 ip_rt_put(rt);
1324} 1329}
1325 1330
1326/*
1327 * IP protocol layer initialiser
1328 */
1329
1330static struct packet_type ip_packet_type = {
1331 .type = __constant_htons(ETH_P_IP),
1332 .func = ip_rcv,
1333};
1334
1335/*
1336 * IP registers the packet type and then calls the subprotocol initialisers
1337 */
1338
1339void __init ip_init(void) 1331void __init ip_init(void)
1340{ 1332{
1341 dev_add_pack(&ip_packet_type);
1342
1343 ip_rt_init(); 1333 ip_rt_init();
1344 inet_initpeers(); 1334 inet_initpeers();
1345 1335