On Thu, Nov 18, 2021 at 10:00:28AM +0100, Claudio Jeker wrote:
> > > I think this needs to be ntohs(tdb->tdb_udpencap_port) since it is still
> > > stored in network byte order.
> > 
> > With ntohs, it's "udpencap_port: 00000000"
> 
> I would also use %d as format string. This is just a simple portnumber.
> 
> The code using tdb_udpencap_port for sure assumes network byte order:
>                 uh->uh_sport = uh->uh_dport = htons(udpencap_port);
>                 if (tdb->tdb_udpencap_port)
>                         uh->uh_dport = tdb->tdb_udpencap_port;

Claudio is right.  It should be %d with ntohs().
OK bluhm@ whoever wants to commit that.

Reply via email to