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  linux-hardening  linux-cve-announce  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:	Wed, 29 Feb 2012 19:45:07 +0300
From:	"Anton 'EvilMan' Danilov" <littlesmilingcloud@...il.com>
To:	netdev@...r.kernel.org
Subject: [PATCH] tc action: pedit, fix header offset calculation

This patch fix header offset calculation in pedit action.
Header offset feature can be used for calculation offset of next
header, if options is presented in ipv4 header.

diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 10d3aed..4678a77 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -151,7 +151,7 @@ static int tcf_pedit(struct sk_buff *skb, const
struct tc_action *a,
							&_d);
				if (!d)
					goto bad;
-				offset += (*d & tkey->offmask) >> tkey->shift;
+				offset += ntohl(*d & tkey->offmask) >> tkey->shift;
			}

			if (offset % 4) {

-- 
Anton.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ