x25: bit and/or confusion in x25_ioctl()?
Subsystems (3)
PATCH 1/1 x25: bit and/or confusion in x25_ioctl()?
Looking at commit ebc3f64b864f it appears that this was intended and not the original, equivalent to `if (facilities.reverse & ~0x81)'.
In x25_parse_facilities() that patch changed how facilities->reverse was set. No other bits were set than 0x80 and/or 0x01.
Signed-off-by Roel Kluin <[email protected]>
---
This is correct isn't it?
net/x25/af_x25.c +1 -1
@@ -1363,7 +1363,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) facilities.throughput > 0xDD)break ;if (facilities.reverse && - (facilities.reverse |0x81 )!=0x81 ) + (facilities.reverse &0x81 ) !=0x81 )break ; x25->facilities = facilities; rc =0 ;
David Miller
maintainerFrom: Roel Kluin <[email protected]>
Date: Wed, 07 Oct 2009 12:59:42 +0200
Quoted 7 lines
Looking at commit
ebc3f64b864fit appears that this was intended and not the original, equivalent to `if (facilities.reverse & ~0x81)'.In
x25_parse_facilities()that patch changed howfacilities->reversewas set. No other bits were set than0x80and/or0x01.Signed-off-by Roel Kluin <[email protected]>
Looks good to me, applied to net-next-2.6