Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0a92be0 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

[SK_BUFF]: Introduce arp_hdr(), remove skb->nh.arph

parent fd74e6cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2524,7 +2524,7 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
				 (2 * sizeof(u32)))))
				 (2 * sizeof(u32)))))
		goto out_unlock;
		goto out_unlock;


	arp = skb->nh.arph;
	arp = arp_hdr(skb);
	if (arp->ar_hln != dev->addr_len ||
	if (arp->ar_hln != dev->addr_len ||
	    skb->pkt_type == PACKET_OTHERHOST ||
	    skb->pkt_type == PACKET_OTHERHOST ||
	    skb->pkt_type == PACKET_LOOPBACK ||
	    skb->pkt_type == PACKET_LOOPBACK ||
+1 −1
Original line number Original line Diff line number Diff line
@@ -1925,7 +1925,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
		 */
		 */
		if ((unlikely(!adapter->sge->espibug_skb[dev->if_port]))) {
		if ((unlikely(!adapter->sge->espibug_skb[dev->if_port]))) {
			if (skb->protocol == htons(ETH_P_ARP) &&
			if (skb->protocol == htons(ETH_P_ARP) &&
			    skb->nh.arph->ar_op == htons(ARPOP_REQUEST)) {
			    arp_hdr(skb)->ar_op == htons(ARPOP_REQUEST)) {
				adapter->sge->espibug_skb[dev->if_port] = skb;
				adapter->sge->espibug_skb[dev->if_port] = skb;
				/* We want to re-use this skb later. We
				/* We want to re-use this skb later. We
				 * simply bump the reference count and it
				 * simply bump the reference count and it
+9 −0
Original line number Original line Diff line number Diff line
@@ -148,4 +148,13 @@ struct arphdr


};
};


#ifdef __KERNEL__
#include <linux/skbuff.h>

static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
{
	return (struct arphdr *)skb_network_header(skb);
}
#endif

#endif	/* _LINUX_IF_ARP_H */
#endif	/* _LINUX_IF_ARP_H */
+0 −1
Original line number Original line Diff line number Diff line
@@ -248,7 +248,6 @@ struct sk_buff {


	union {
	union {
		struct ipv6hdr	*ipv6h;
		struct ipv6hdr	*ipv6h;
		struct arphdr	*arph;
		unsigned char	*raw;
		unsigned char	*raw;
	} nh;
	} nh;


+1 −1
Original line number Original line Diff line number Diff line
@@ -670,7 +670,7 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff **pskb,
		(*pskb)->nh.raw += VLAN_HLEN;
		(*pskb)->nh.raw += VLAN_HLEN;
	}
	}


	if (skb->nh.arph->ar_pln != 4) {
	if (arp_hdr(skb)->ar_pln != 4) {
		if (IS_VLAN_ARP(skb)) {
		if (IS_VLAN_ARP(skb)) {
			skb_push(*pskb, VLAN_HLEN);
			skb_push(*pskb, VLAN_HLEN);
			(*pskb)->nh.raw -= VLAN_HLEN;
			(*pskb)->nh.raw -= VLAN_HLEN;
Loading