Skip to content

Commit

Permalink
ipv6: correct the ipv6 option name - Pad0 to Pad1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
eldad authored and davem330 committed May 17, 2012
1 parent 048b899 commit 1de5a71
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/linux/in6.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct in6_flowlabel_req {
/*
* IPv6 TLV options.
*/
#define IPV6_TLV_PAD0 0
#define IPV6_TLV_PAD1 0
#define IPV6_TLV_PADN 1
#define IPV6_TLV_ROUTERALERT 5
#define IPV6_TLV_JUMBO 194
Expand Down
4 changes: 2 additions & 2 deletions net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
hopopt[3] = 2; /* Length of RA Option */
hopopt[4] = 0; /* Type = 0x0000 (MLD) */
hopopt[5] = 0;
hopopt[6] = IPV6_TLV_PAD0; /* Pad0 */
hopopt[7] = IPV6_TLV_PAD0; /* Pad0 */
hopopt[6] = IPV6_TLV_PAD1; /* Pad1 */
hopopt[7] = IPV6_TLV_PAD1; /* Pad1 */

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

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/br_netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static int check_hbh_len(struct sk_buff *skb)
int optlen = nh[off + 1] + 2;

switch (nh[off]) {
case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;

Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/ah6.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr)

switch (opt[off]) {

case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;
default:
Expand Down Expand Up @@ -171,7 +171,7 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des

switch (opt[off]) {

case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int ipv6_find_tlv(struct sk_buff *skb, int offset, int type)
return offset;

switch (opttype) {
case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;
default:
Expand Down Expand Up @@ -156,7 +156,7 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
int i;

switch (nh[off]) {
case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/mip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static inline void *mip6_padn(__u8 *data, __u8 padlen)
if (!data)
return NULL;
if (padlen == 1) {
data[0] = IPV6_TLV_PAD0;
data[0] = IPV6_TLV_PAD1;
} else if (padlen > 1) {
data[0] = IPV6_TLV_PADN;
data[1] = padlen - 2;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_csum.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static int tcf_csum_ipv6_hopopts(struct ipv6_opt_hdr *ip6xh,

while (len > 1) {
switch (xh[off]) {
case IPV6_TLV_PAD0:
case IPV6_TLV_PAD1:
optlen = 1;
break;
case IPV6_TLV_JUMBO:
Expand Down

0 comments on commit 1de5a71

Please sign in to comment.