lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 16 Jul 2016 10:46:59 +0100
From:	Richard Stearn <richard@...-stearn.demon.co.uk>
To:	netdev@...r.kernel.org, linux-hams@...r.kernel.org
Subject: [PATCH 6/6]NET:AX25:ROSE Removes a conditional return and
 corrects the return value.

Subject: [PATCH 6/6]NET:AX25:ROSE Removes a conditional return and corrects the return value.
Removes a conditional return and corrects the return value.

The ROSE header is always finished (as it is not dependant on daddr) so
the test for daddr is not required.

Return value fixed as positive added header length.

Signed-off-by: Richard Stearn <richard@...-stearn.demon.co.uk>
---
 net/rose/rose_dev.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c
index 44eca10..dc38608 100644
--- a/net/rose/rose_dev.c
+++ b/net/rose/rose_dev.c
@@ -47,10 +47,7 @@ static int rose_header(struct sk_buff *skb, struct net_device *dev,
 	*buff++ = 0x7F;				/* magic marker */
 	*buff++ = AX25_P_IP;			/* this is an IP packet */
 
-	if (daddr != NULL)
-		return 37;
-
-	return -37;
+	return ROSE_MIN_LEN + 2;	/* always creates a finished header */
 }
 
 static int rose_set_mac_address(struct net_device *dev, void *addr)

Powered by blists - more mailing lists