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.)