Merge pull request #305 from CGarces/fix_regresion

__nat25_add_pppoe_tag: fix regresion from #298
This commit is contained in:
Carlos Garcés 2022-12-25 20:29:34 +01:00 committed by GitHub
commit aeed529c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
} }