diff options
| author | Xie He <[email protected]> | 2020-09-02 12:07:06 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-09-02 22:42:43 +0000 |
| commit | 2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119 (patch) | |
| tree | 8fe5274faf22190c932a3f8f5768a825f8aaf1a6 /net/ipv6/sysctl_net_ipv6.c | |
| parent | net: gemini: Fix another missing clk_disable_unprepare() in probe (diff) | |
| download | kernel-2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119.tar.gz kernel-2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119.zip | |
drivers/net/wan/hdlc: Change the default of hard_header_len to 0
Change the default value of hard_header_len in hdlc.c from 16 to 0.
Currently there are 6 HDLC protocol drivers, among them:
hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when
attaching the protocol, overriding the default. So this patch does not
affect them.
hdlc_raw and hdlc_fr don't set hard_header_len when attaching the
protocol. So this patch will change the hard_header_len of the HDLC
device for them from 16 to 0.
This is the correct change because both hdlc_raw and hdlc_fr don't have
header_ops, and the code in net/packet/af_packet.c expects the value of
hard_header_len to be consistent with header_ops.
In net/packet/af_packet.c, in the packet_snd function,
for AF_PACKET/DGRAM sockets it would reserve a headroom of
hard_header_len and call dev_hard_header to fill in that headroom,
and for AF_PACKET/RAW sockets, it does not reserve the headroom and
does not call dev_hard_header, but checks if the user has provided a
header of length hard_header_len (in function dev_validate_header).
Cc: Krzysztof Halasa <[email protected]>
Cc: Martin Schiller <[email protected]>
Signed-off-by: Xie He <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
0 files changed, 0 insertions, 0 deletions
