Project

General

Profile

Bug #6212 » 0002-two-extension-headers.patch

pablo, 10/06/2023 11:16 AM

View differences:

drivers/net/gtp.c
938 938
{
939 939
	int payload_len = skb->len;
940 940
	struct gtp1_header_long *gtp1;
941
	char ext_hdr[4] = { 0x01, 0x00, 0xff, 0x00}; /* extension header */
941
	/* length (including exthdr in 4-byte words, payload (variable), next. */
942
	char ext_hdr[8] = { 0x01, 0x00, 0xff, 0x33, 0x01, 0x00, 0xff, 0x00}; /* extension header */
942 943

  
943 944
	gtp1 = skb_push(skb, sizeof(*gtp1) + sizeof(ext_hdr));
944 945
	memset(gtp1, 0, sizeof(*gtp1) + sizeof(ext_hdr));
......
951 952
	 */
952 953
	gtp1->flags	= 0x30; /* v1, GTP-non-prime. */
953 954
	gtp1->type	= GTP_TPDU;
954
	gtp1->length	= htons(payload_len);
955
	/* TS 29.060: "The Sequence Number, the N-PDU Number or any Extension
956
	 * headers shall be considered to be part of the payload, i.e. included
957
	 * in the length count".
958
	 */
959
	gtp1->length	= htons(payload_len + 4 + sizeof(ext_hdr));
955 960
	gtp1->tid	= htonl(pctx->u.v1.o_tei);
956 961
	gtp1->next	= 0x32;
957 962

  
(2-2/2)
Add picture from clipboard (Maximum size: 48.8 MB)