__nat25_add_pppoe_tag: fix regresion from #298

This commit is contained in:
Carlos Garcés 2022-12-25 19:13:28 +00:00
parent 0043022f0c
commit d6e2af011d

View File

@ -116,7 +116,7 @@ static int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
/* have a room for new tag */ /* have a room for new tag */
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length)); memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
ph->length = htons(ntohs(ph->length) + data_len); ph->length = htons(ntohs(ph->length) + data_len);
memcpy((unsigned char *)ph->tag, tag, tag->tag_len); memcpy((unsigned char *)ph->tag, tag, data_len);
return data_len; return data_len;
} }