[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20100914163208.2ba165ca.akpm@linux-foundation.org>
Date: Tue, 14 Sep 2010 16:32:08 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: wtweeker@....com
Cc: bugzilla-daemon@...zilla.kernel.org,
bugme-daemon@...zilla.kernel.org, netdev@...r.kernel.org,
Stephen Hemminger <shemminger@...tta.com>,
Patrick McHardy <kaber@...sh.net>
Subject: Re: [Bugme-new] [Bug 17622] New: snmp trap ALG issue
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Thu, 2 Sep 2010 09:25:12 GMT
bugzilla-daemon@...zilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=17622
>
> Summary: snmp trap ALG issue
> Product: Networking
> Version: 2.5
> Kernel Version: 2.6.35.4
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: IPV4
> AssignedTo: shemminger@...ux-foundation.org
> ReportedBy: wtweeker@....com
> Regression: No
>
>
> Symptom:
> SNMP manager can't show trap when SNMP agent set trap message to version1.
>
> steps to reproduce:
> (1)SNMP agent-----linux device(NAT)-----SNMP manager.
> (2)Set SNMP agent trap message to version 1, destination IP as SNMP manger's
> IP.
> (3)Do some operation to generate trap message, such as make one port of SNMP
> agent up and down. But SNMP manger can't accept trap message.
>
> I have capured the packet by Ethereal software, and check the SNMP trap packet,
> found that the UDP checksum is incorrect.
> I think that the function fast_csum()(nf_nat_snmp_basic.c) have some problem.
>
and
> I have changed this function by refering to other checksum algorithm.
> And tested it, it can work. the checksum is correct.
>
> static void fast_csum(__sum16 *csum,
> const unsigned char *optr,
> const unsigned char *nptr,
> int offset)
> {
> unsigned char s[4];
>
> if (offset & 1) {
> s[0] = s[2] = 0;
> s[0] = ~s[0]; //this line is add by me
> s[1] = ~*optr;
> s[3] = *nptr;
> } else {
> s[1] = s[3] = 0;
> s[1] = ~s[1];//this line is add by me
> s[0] = ~*optr;
> s[2] = *nptr;
> }
>
> *csum = csum_fold(csum_partial(s, 4, ~csum_unfold(*csum)));
> }
Great. Please prepare a kernel patch as per
Documentation/SubmittingPatches and send it via a reply-to-all to this
email?
Thanks.
--
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