Attention is currently required from: pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/34963?usp=email )

Change subject: ranap_transp_layer_addr_decode2(): Fix decoding X.213 IPv4 
address len=7
......................................................................


Patch Set 3: Code-Review+1

(1 comment)

File src/iu_helpers.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/34963/comment/8d3e4ab7_b7337e68
PS3, Line 143:  if ((len == 7 || len == 20) && buf[0] == 0x35) {
What do you think about allowing anything between 7..20? For an IPv4, there are 
just zero padding bytes, so we could allow any number of padding...
The X.213 does indicate IP version explicitly, so we don't need to derive the 
address family from the nr of bytes. We can just check that there are enough 
bytes available. Not sure if it makes sense to include the entire range, just 
asking what you think...

Just after writing this, I noticed that we use the length to detect X.213 vs 
other formats, particularly headerless IPv6 == 16 bytes. So better to just 
allow 7, right.

(This here is a contender for the weirdest convoluted spaghetti way of 
conveying an IP address on the wire, can you believe it.)



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/34963?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I507fb1605d976bd8573162e4fa81721245330184
Gerrit-Change-Number: 34963
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Fri, 03 Nov 2023 19:25:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to