mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[AX25/NETROM]: Cleanup direct calls into IP stack
Get rid of the calls to ip_rcv and arp_rcv which were layering violations anyway. With those being replaced by netif_rx, less parts of AX.25 and relatives depend on INET support actually being enabled. This also will make PF_PACKET sockets work for IP and ARP packets received over AX.25 and for IP packets over NET/ROM. Signed-off-by: Ralf Baechle DL5RB <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
0c7770c740
commit
98a82febb6
3 changed files with 7 additions and 16 deletions
|
|
@ -858,17 +858,16 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
|
|||
frametype = skb->data[19] & 0x0F;
|
||||
flags = skb->data[19] & 0xF0;
|
||||
|
||||
#ifdef CONFIG_INET
|
||||
/*
|
||||
* Check for an incoming IP over NET/ROM frame.
|
||||
*/
|
||||
if (frametype == NR_PROTOEXT && circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) {
|
||||
if (frametype == NR_PROTOEXT &&
|
||||
circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) {
|
||||
skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
|
||||
skb->h.raw = skb->data;
|
||||
|
||||
return nr_rx_ip(skb, dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Find an existing socket connection, based on circuit ID, if it's
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
#include <net/ax25.h>
|
||||
#include <net/netrom.h>
|
||||
|
||||
#ifdef CONFIG_INET
|
||||
|
||||
/*
|
||||
* Only allow IP over NET/ROM frames through if the netrom device is up.
|
||||
*/
|
||||
|
|
@ -64,11 +62,12 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev)
|
|||
skb->nh.raw = skb->data;
|
||||
skb->pkt_type = PACKET_HOST;
|
||||
|
||||
ip_rcv(skb, skb->dev, NULL, skb->dev);
|
||||
netif_rx(skb);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INET
|
||||
|
||||
static int nr_rebuild_header(struct sk_buff *skb)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue