net: Add framework to allow sending packets with customized CRC.
This is useful for testing RX handling of frames with bad CRCs. Requires driver support to actually put the packet on the wire properly. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
@@ -592,6 +592,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
|
||||
new->rxhash = old->rxhash;
|
||||
new->ooo_okay = old->ooo_okay;
|
||||
new->l4_rxhash = old->l4_rxhash;
|
||||
new->no_fcs = old->no_fcs;
|
||||
#ifdef CONFIG_XFRM
|
||||
new->sp = secpath_get(old->sp);
|
||||
#endif
|
||||
|
@@ -799,6 +799,11 @@ set_rcvbuf:
|
||||
else
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
|
||||
case SO_NOFCS:
|
||||
sock_valbool_flag(sk, SOCK_NOFCS, valbool);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -ENOPROTOOPT;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user