Your message dated Sat, 14 Jun 2008 15:57:45 -0700 with message-id <[EMAIL PROTECTED]> has caused the report #474000, regarding dhcp3-common: dhcp should set the protocol when sending packets using AF_PACKET to be marked as having been forwarded to the upstream software author(s) [EMAIL PROTECTED]
(NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [EMAIL PROTECTED] immediately.) -- 474000: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474000 Debian Bug Tracking System Contact [EMAIL PROTECTED] with problems
--- Begin Message ---Hello, This bug was received by a Debian user, and includes a patch for the problem reported. You might like to consider including it in a future point release of 3.1 Please maintain the Cc on any correspondence to keep our BTS in the loop. regards Andrew ----- Forwarded message from Patrick McHardy <[EMAIL PROTECTED]> ----- Subject: Bug#474000: dhcp3-common: dhcp should set the protocol when sending packets using AF_PACKET Reply-To: Patrick McHardy <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Resent-From: Patrick McHardy <[EMAIL PROTECTED]> Resent-To: [EMAIL PROTECTED] Resent-CC: Andrew Pollock <[EMAIL PROTECTED]> Resent-Date: Wed, 02 Apr 2008 15:36:02 +0000 Resent-Message-ID: <[EMAIL PROTECTED]> Resent-Sender: [EMAIL PROTECTED] X-Debian-PR-Message: report 474000 X-Debian-PR-Package: dhcp3-common X-Debian-PR-Keywords: patch X-Debian-PR-Source: dhcp3 X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02 (2006-07-26) on rietz.debian.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=BAYES_00,FORGED_RCVD_HELO, FOURLA,HAS_PACKAGE,IMPRONONCABLE_1,MURPHY_DRUGS_REL8, MURPHY_WRONG_WORD2 autolearn=no version=3.1.4-bugs.debian.org_2005_01_02 From: Patrick McHardy <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Package: dhcp3-common Version: 3.1.0-5 Severity: important Tags: patch dhclient (applies to dhcpd as well) doesn't initialize the spkt_protocol member of the sockaddr used for sending packets, which makes the kernel initialize skb->protocol to an incorrect value (0) instead of ETH_P_IP. This field is used by traffic classifiers, rules specifying "protocol ip" won't match and dhcp queries (in my case) are dropped. This patch (in case reportbug gives me an opportunity to attach it, otherwise will follow in mail) properly initializes the sockaddr, fixing the problem. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-rc6 (SMP w/2 CPU cores; PREEMPT) Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash --- a/common/lpf.c 2007-05-24 01:30:32.000000000 +0200 +++ b/common/lpf.c 2008-04-02 17:25:35.000000000 +0200 @@ -39,6 +39,7 @@ static char copyright[] = #include <asm/types.h> #include <linux/filter.h> #include <linux/if_ether.h> +#include <linux/if_packet.h> #include <netinet/in_systm.h> #include "includes/netinet/ip.h" #include "includes/netinet/udp.h" @@ -293,7 +294,7 @@ ssize_t send_packet (interface, packet, double hh [16]; double ih [1536 / sizeof (double)]; unsigned char *buf = (unsigned char *)ih; - struct sockaddr sa; + struct sockaddr_pkt sa; int result; int fudge; @@ -314,12 +315,14 @@ ssize_t send_packet (interface, packet, /* For some reason, SOCK_PACKET sockets can't be connected, so we have to do a sentdo every time. */ memset (&sa, 0, sizeof sa); - sa.sa_family = AF_PACKET; - strncpy (sa.sa_data, - (const char *)interface -> ifp, sizeof sa.sa_data); + sa.spkt_family = AF_PACKET; + strncpy (sa.spkt_device, + (const char *)interface -> ifp, sizeof sa.spkt_device); + sa.spkt_protocol = htons(ETH_P_IP); result = sendto (interface -> wfdesc, - buf + fudge, ibufp + len - fudge, 0, &sa, sizeof sa); + buf + fudge, ibufp + len - fudge, 0, + (struct sockaddr *)&sa, sizeof sa); if (result < 0) log_error ("send_packet: %m"); return result; ----- End forwarded message -----
--- End Message ---

