diff options
Diffstat (limited to 'net/ax25/ax25_in.c')
-rw-r--r-- | net/ax25/ax25_in.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index 3dc808fde33f..810c9c76c2e0 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) | 9 | * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) |
10 | * Copyright (C) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) | 10 | * Copyright (C) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/socket.h> | 14 | #include <linux/socket.h> |
@@ -26,9 +25,7 @@ | |||
26 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
27 | #include <linux/netfilter.h> | 26 | #include <linux/netfilter.h> |
28 | #include <net/sock.h> | 27 | #include <net/sock.h> |
29 | #include <net/ip.h> /* For ip_rcv */ | 28 | #include <net/tcp_states.h> |
30 | #include <net/tcp.h> | ||
31 | #include <net/arp.h> /* For arp_rcv */ | ||
32 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
33 | #include <asm/system.h> | 30 | #include <asm/system.h> |
34 | #include <linux/fcntl.h> | 31 | #include <linux/fcntl.h> |
@@ -114,7 +111,6 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) | |||
114 | 111 | ||
115 | pid = *skb->data; | 112 | pid = *skb->data; |
116 | 113 | ||
117 | #ifdef CONFIG_INET | ||
118 | if (pid == AX25_P_IP) { | 114 | if (pid == AX25_P_IP) { |
119 | /* working around a TCP bug to keep additional listeners | 115 | /* working around a TCP bug to keep additional listeners |
120 | * happy. TCP re-uses the buffer and destroys the original | 116 | * happy. TCP re-uses the buffer and destroys the original |
@@ -132,10 +128,9 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) | |||
132 | skb->dev = ax25->ax25_dev->dev; | 128 | skb->dev = ax25->ax25_dev->dev; |
133 | skb->pkt_type = PACKET_HOST; | 129 | skb->pkt_type = PACKET_HOST; |
134 | skb->protocol = htons(ETH_P_IP); | 130 | skb->protocol = htons(ETH_P_IP); |
135 | ip_rcv(skb, skb->dev, NULL); /* Wrong ptype */ | 131 | netif_rx(skb); |
136 | return 1; | 132 | return 1; |
137 | } | 133 | } |
138 | #endif | ||
139 | if (pid == AX25_P_SEGMENT) { | 134 | if (pid == AX25_P_SEGMENT) { |
140 | skb_pull(skb, 1); /* Remove PID */ | 135 | skb_pull(skb, 1); /* Remove PID */ |
141 | return ax25_rx_fragment(ax25, skb); | 136 | return ax25_rx_fragment(ax25, skb); |
@@ -250,7 +245,6 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
250 | 245 | ||
251 | /* Now we are pointing at the pid byte */ | 246 | /* Now we are pointing at the pid byte */ |
252 | switch (skb->data[1]) { | 247 | switch (skb->data[1]) { |
253 | #ifdef CONFIG_INET | ||
254 | case AX25_P_IP: | 248 | case AX25_P_IP: |
255 | skb_pull(skb,2); /* drop PID/CTRL */ | 249 | skb_pull(skb,2); /* drop PID/CTRL */ |
256 | skb->h.raw = skb->data; | 250 | skb->h.raw = skb->data; |
@@ -258,7 +252,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
258 | skb->dev = dev; | 252 | skb->dev = dev; |
259 | skb->pkt_type = PACKET_HOST; | 253 | skb->pkt_type = PACKET_HOST; |
260 | skb->protocol = htons(ETH_P_IP); | 254 | skb->protocol = htons(ETH_P_IP); |
261 | ip_rcv(skb, dev, ptype); /* Note ptype here is the wrong one, fix me later */ | 255 | netif_rx(skb); |
262 | break; | 256 | break; |
263 | 257 | ||
264 | case AX25_P_ARP: | 258 | case AX25_P_ARP: |
@@ -268,9 +262,8 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
268 | skb->dev = dev; | 262 | skb->dev = dev; |
269 | skb->pkt_type = PACKET_HOST; | 263 | skb->pkt_type = PACKET_HOST; |
270 | skb->protocol = htons(ETH_P_ARP); | 264 | skb->protocol = htons(ETH_P_ARP); |
271 | arp_rcv(skb, dev, ptype); /* Note ptype here is wrong... */ | 265 | netif_rx(skb); |
272 | break; | 266 | break; |
273 | #endif | ||
274 | case AX25_P_TEXT: | 267 | case AX25_P_TEXT: |
275 | /* Now find a suitable dgram socket */ | 268 | /* Now find a suitable dgram socket */ |
276 | sk = ax25_get_socket(&dest, &src, SOCK_DGRAM); | 269 | sk = ax25_get_socket(&dest, &src, SOCK_DGRAM); |
@@ -454,7 +447,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
454 | * Receive an AX.25 frame via a SLIP interface. | 447 | * Receive an AX.25 frame via a SLIP interface. |
455 | */ | 448 | */ |
456 | int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, | 449 | int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, |
457 | struct packet_type *ptype) | 450 | struct packet_type *ptype, struct net_device *orig_dev) |
458 | { | 451 | { |
459 | skb->sk = NULL; /* Initially we don't know who it's for */ | 452 | skb->sk = NULL; /* Initially we don't know who it's for */ |
460 | skb->destructor = NULL; /* Who initializes this, dammit?! */ | 453 | skb->destructor = NULL; /* Who initializes this, dammit?! */ |