All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH 2.5]: Use struct ip_esp_hdr from ip.h for ipt_esp.c
Date: Mon, 21 Jul 2003 03:39:47 +0200	[thread overview]
Message-ID: <3F1B4463.6050004@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

This patch makes ipt_esp.c use struct ip_esp_hdr from ip.h instead of
declaring its own. Since struct esphdr contained only the spi this patch
changes the logging behaviour slightly, packets with incomplete esp
headers will be logged as incomplete instead of having their spi logged
as long as they are > 4b.

Best regards,
Patrick

[-- Attachment #2: 25-ipt_esp-esphdr.diff --]
[-- Type: text/plain, Size: 1336 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1537  -> 1.1538 
#	net/ipv4/netfilter/ipt_esp.c	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/07/21	kaber@trash.net	1.1538
# [NETFILTER]: Use common struct ip_esp_hdr declaration
# --------------------------------------------
#
--- a/net/ipv4/netfilter/ipt_esp.c	Thu May 22 01:35:36 2003
+++ b/net/ipv4/netfilter/ipt_esp.c	Mon Jul 21 02:46:04 2003
@@ -1,6 +1,7 @@
 /* Kernel module to match ESP parameters. */
 #include <linux/module.h>
 #include <linux/skbuff.h>
+#include <linux/ip.h>
 
 #include <linux/netfilter_ipv4/ipt_esp.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
@@ -13,10 +14,6 @@
 #define duprintf(format, args...)
 #endif
 
-struct esphdr {
-	__u32   spi;
-};
-
 /* Returns 1 if the spi is matched by the range, 0 otherwise */
 static inline int
 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, int invert)
@@ -37,7 +34,7 @@
       int offset,
       int *hotdrop)
 {
-	struct esphdr esp;
+	struct ip_esp_hdr esp;
 	const struct ipt_esp *espinfo = matchinfo;
 
 	/* Must not be a fragment. */

                 reply	other threads:[~2003-07-21  1:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F1B4463.6050004@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.