Skip to content

Commit 1de5a71

Browse files
eldaddavem330
authored andcommitted
ipv6: correct the ipv6 option name - Pad0 to Pad1
The padding destination or hop-by-hop option is called Pad1 and not Pad0. See RFC2460 (4.2) or the IANA ipv6-parameters registry: http://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xml Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 048b899 commit 1de5a71

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

include/linux/in6.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct in6_flowlabel_req {
142142
/*
143143
* IPv6 TLV options.
144144
*/
145-
#define IPV6_TLV_PAD0 0
145+
#define IPV6_TLV_PAD1 0
146146
#define IPV6_TLV_PADN 1
147147
#define IPV6_TLV_ROUTERALERT 5
148148
#define IPV6_TLV_JUMBO 194

net/bridge/br_multicast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
460460
hopopt[3] = 2; /* Length of RA Option */
461461
hopopt[4] = 0; /* Type = 0x0000 (MLD) */
462462
hopopt[5] = 0;
463-
hopopt[6] = IPV6_TLV_PAD0; /* Pad0 */
464-
hopopt[7] = IPV6_TLV_PAD0; /* Pad0 */
463+
hopopt[6] = IPV6_TLV_PAD1; /* Pad1 */
464+
hopopt[7] = IPV6_TLV_PAD1; /* Pad1 */
465465

466466
skb_put(skb, sizeof(*ip6h) + 8);
467467

net/bridge/br_netfilter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ static int check_hbh_len(struct sk_buff *skb)
558558
int optlen = nh[off + 1] + 2;
559559

560560
switch (nh[off]) {
561-
case IPV6_TLV_PAD0:
561+
case IPV6_TLV_PAD1:
562562
optlen = 1;
563563
break;
564564

net/ipv6/ah6.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr)
127127

128128
switch (opt[off]) {
129129

130-
case IPV6_TLV_PAD0:
130+
case IPV6_TLV_PAD1:
131131
optlen = 1;
132132
break;
133133
default:
@@ -171,7 +171,7 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des
171171

172172
switch (opt[off]) {
173173

174-
case IPV6_TLV_PAD0:
174+
case IPV6_TLV_PAD1:
175175
optlen = 1;
176176
break;
177177
default:

net/ipv6/exthdrs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int ipv6_find_tlv(struct sk_buff *skb, int offset, int type)
7575
return offset;
7676

7777
switch (opttype) {
78-
case IPV6_TLV_PAD0:
78+
case IPV6_TLV_PAD1:
7979
optlen = 1;
8080
break;
8181
default:
@@ -156,7 +156,7 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
156156
int i;
157157

158158
switch (nh[off]) {
159-
case IPV6_TLV_PAD0:
159+
case IPV6_TLV_PAD1:
160160
optlen = 1;
161161
break;
162162

net/ipv6/mip6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static inline void *mip6_padn(__u8 *data, __u8 padlen)
4646
if (!data)
4747
return NULL;
4848
if (padlen == 1) {
49-
data[0] = IPV6_TLV_PAD0;
49+
data[0] = IPV6_TLV_PAD1;
5050
} else if (padlen > 1) {
5151
data[0] = IPV6_TLV_PADN;
5252
data[1] = padlen - 2;

net/sched/act_csum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ static int tcf_csum_ipv6_hopopts(struct ipv6_opt_hdr *ip6xh,
397397

398398
while (len > 1) {
399399
switch (xh[off]) {
400-
case IPV6_TLV_PAD0:
400+
case IPV6_TLV_PAD1:
401401
optlen = 1;
402402
break;
403403
case IPV6_TLV_JUMBO:

0 commit comments

Comments
 (0)