Search Linux Wireless

RE: [net-next v2 3/3] cfg80211: add MPLS and 802.21 classification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> It seem eh->h_proto should be the same as skb->protocol, right? So why not
> add these case statements to the switch below?

Thought so, as well. But it seems that skb->protocol is not properly set when the packet originates from a packet socket.
And in our case we cannot set it to a fixed etherType in the bind() call since we use three different etherTypes on the same socket.

Cheers,

Mathias
 
> Regards,
> Arend
> 
> > +		case htons(ETH_P_MPLS_UC):
> > +		case htons(ETH_P_MPLS_MC):
> > +			/* MPLS */
> > +			mpls = skb_header_pointer(skb, sizeof(*eh),
> > +						  sizeof(*mpls),&mpls_tmp);
> > +			if (!mpls)
> > +				break;
> > +
> > +			return (ntohl(mpls->entry)&  MPLS_LS_TC_MASK)
> > +				>>  MPLS_LS_TC_SHIFT;
> > +		case htons(ETH_P_80221):
> > +			/* 802.21 is always network control traffic */
> > +			return 7;
> > +		default:
> > +			break;
> > +		}
> > +	}
> > +
> >   	switch (skb->protocol) {
> >   	case htons(ETH_P_IP):
> >   		dscp = ipv4_get_dsfield(ip_hdr(skb))&  0xfc;

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux