Skip to contentSkip to conversation

sctp: use transport to guess overhead value of packet

PATCH In review Shan Wei 1 participant 1 message Jul 2, 2010

Subsystems (2)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/3 sctp: use transport to guess overhead value of packet

Although the assoc is null, we can use af_specific of transport to point to header size of IPv4 or IPv6.

---
 net/sctp/output.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sctp/output.c +1 -1
index a646681..48177d3 100644
@@ -127,7 +127,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
 		struct sctp_sock *sp = sctp_sk(asoc->base.sk);
 		overhead = sp->pf->af->net_header_len;
 	} else {
-		overhead = sizeof(struct ipv6hdr);
+		overhead = transport->af_specific->net_header_len;
 	}
 	overhead += sizeof(struct sctphdr);
 	packet->overhead = overhead;
Signature · 1 line
1.7.0