* Re: New Script
From: Anders Fugmann @ 2003-01-09 15:06 UTC (permalink / raw)
To: mdew; +Cc: netfilter
In-Reply-To: <1042115936.423.58.camel@nirvana>
mdew wrote:
> Ok, after taking a few samples from scripts in the mailing list, Ive
> come up with this...hopefully my edonkey problem has been solved with
> this script. I havent actually tested this yet, Probably tomorrow (its a
> bit late)
Next time - Test first, then post.
>
> current Router setup.
> (Internet) 210.54.175.12->eth0---Router--->eth1 10.0.0.6 -=> 10.0.0.x
>
>
> #!/bin/bash
>
> IPTABLES="/sbin/iptables"
> PAUL="10.0.0.9"
> echo "1" > /proc/sys/net/ipv4/ip_forward
>
> echo "Executing The Firwall..."
> echo ""
> echo -n "Loading Modules..."
> /sbin/modprobe ip_conntrack_ftp
> /sbin/modprobe ip_conntrack_irc
> /sbin/modprobe ip_nat_irc
> /sbin/modprobe ip_nat_ftp
> /sbin/modprobe ipt_state
> /sbin/modprobe ipt_limit
> /sbin/modprobe ipt_LOG
> echo -n "Done"
>
> $IPTABLES -F INPUT
> $IPTABLES -F OUTPUT
> $IPTABLES -F FORWARD
I would recommend that you set the default policy here to DENY and add
the rules:
$IPTABLES -a FORWARD -i eth0 -o eth1 -m state --state \
RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -a FORWARD -o eth0 -i eth1 -j ACCEPT
to allow machines behind to firewall to comminucate freely with servers
on the internet.
> $IPTABLES -P INPUT ACCEPT
Uh. Dont allow anything on the INPUT chain.
> $IPTABLES -P OUTPUT ACCEPT
>
> echo "Allow unlimited traffic on the loopback interface"
> $IPTABLES -A INPUT -i lo -j ACCEPT
> $IPTABLES -A OUTPUT -o lo -j ACCEPT
>
> echo "Refusing spoofed packets pretending to be from your IP address"
> $IPTABLES -A INPUT -s 210.54.175.12 -j DROP
>
> echo "Allow SSH"
> # Is this correct?
> $IPTABLES -A INPUT -i eth0 -p tcp --sport 22 -j ACCEPT
> $IPTABLES -A INPUT -i eth1 -p tcp --sport 22 -j ACCEPT
> $IPTABLES -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
> $IPTABLES -A INPUT -i eth1 -p tcp --dport 22 -j ACCEPT
>
> echo "Allow ftp"
> $IPTABLES -A INPUT -p tcp --sport 21 -m state --state ESTABLISHED -j
> ACCEPT
> $IPTABLES -A OUTPUT -p tcp --dport 21 -m state --state NEW,ESTABLISHED
> -j ACCEPT
>
> echo "Active ftp"
> $IPTABLES -A INPUT -p tcp --sport 20 -m state --state
> ESTABLISHED,RELATED -j ACCEPT
> $IPTABLES -A OUTPUT -p tcp --dport 20 -m state --state ESTABLISHED -j
> ACCEPT
>
> echo "Passive ftp"
> $IPTABLES -A INPUT -p tcp --sport 1024:65535 --dport 1024:65535 -m state
> --state ESTABLISHED -j ACCEPT
> $IPTABLES -A OUTPUT -p tcp --sport 1024:65535 --dport 1024:65535 -m
> state --state ESTABLISHED,RELATED -j ACCEPT
>
> echo "Allow DNS"
> $IPTABLES -A INPUT -p tcp --sport 53 -j ACCEPT
> $IPTABLES -A INPUT -p udp --sport 53 -j ACCEPT
> $IPTABLES -A OUTPUT -p tcp --dport 53 -j ACCEPT
> $IPTABLES -A OUTPUT -p udp --dport 53 -j ACCEPT
>
> echo "Allow SFTP"
> $IPTABLES -A OUTPUT -p tcp --dport 115 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 115 -j ACCEPT
>
> echo "Allow HTTP"
> $IPTABLES -A OUTPUT -p tcp --dport 80 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 80 -j ACCEPT
>
> echo "Allow https"
> $IPTABLES -A OUTPUT -p tcp --dport 443 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 443 -j ACCEPT
>
> echo "Rejecting all connections to 135:139"
> $IPTABLES -N NETBIOS
> $IPTABLES -A INPUT -p udp --sport 135:139 -j NETBIOS
> $IPTABLES -A INPUT -p tcp --sport 135:139 -j NETBIOS
> $IPTABLES -A INPUT -p udp --dport 135:139 -j NETBIOS
> $IPTABLES -A INPUT -p tcp --dport 135:139 -j NETBIOS
> $IPTABLES -A NETBIOS -j LOG --log-prefix "IPTABLES NETBIOS: "
> $IPTABLES -A NETBIOS -j DROP
>
> echo "Limit port 4665 traffic to PAUL"
> $IPTABLES -N PAULS_STUFF
> $IPTABLES -A FORWARD -p tcp -s $PAUL --dport 4665 -m limit --limit
> 1/hour -j PAULS_STUFF
> $IPTABLES -A FORWARD -p udp -s $PAUL --dport 4665 -m limit --limit
> 1/hour -j PAULS_STUFF
> $IPTABLES -A FORWARD -p udp -s $PAUL --sport 4665 -m limit --limit
> 1/hour -j PAULS_STUFF
> $IPTABLES -A FORWARD -p tcp -s $PAUL --sport 4665 -m limit --limit
> 1/hour -j PAULS_STUFF
> $IPTABLES -A PAULS_STUFF -j LOG --log-prefix "IPTABLES PAUL: "
> $IPTABLES -A PAULS_STUFF -j ACCEPT
What are you trying here? Linit should not be used as traffic shaping.
Please use programs in the iproute2 package instead. It will handle
things much better.
>
> echo "Allowing SMTP"
> $IPTABLES -A OUTPUT -p tcp --dport 25 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 25 -j ACCEPT
>
> echo "Allowing POP3"
> $IPTABLES -A OUTPUT -p tcp --dport 110 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 110 -j ACCEPT
>
> echo "Allowing Ident"
> $IPTABLES -A OUTPUT -p tcp --dport 113 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 113 -j ACCEPT
>
> echo "Allowing Netmeeting/MSN"
> $IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 1863 -j \
> REDIRECT --to-ports 1863
> $IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 389 -j \
> REDIRECT --to-ports 389
> $IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 522 -j \
> REDIRECT --to-ports 522
>
> echo "Allowing EDonkey2k/Emule"
> echo "See: http://www.emule-project.net/faq/ports.htm"
> # should i use any -A FORWARD or PREROUTING here?
> $IPTABLES -A OUTPUT -p tcp --dport 4661 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 4661 -j ACCEPT
> $IPTABLES -A OUTPUT -p tcp --dport 4662 -j ACCEPT
> $IPTABLES -A INPUT -p tcp --sport 4662 -j ACCEPT
> $IPTABLES -A OUTPUT -p udp --dport 4665 -j ACCEPT
> $IPTABLES -A INPUT -p udp --sport 4665 -j ACCEPT
> $IPTABLES -A OUTPUT -p udp --dport 4672 -j ACCEPT
> $IPTABLES -A INPUT -p udp --sport 4672 -j ACCEPT
I'm not sure what you want here. But if all you want is to allow users
to connect to server on the internet on port 4672, then its covered be
the rules below.
>
> $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
For the protocols ssh, ftp, http, dns, smtp, pop3 and ident you can
delete all the rules conserning these, as the line above take care of
all that.
> $IPTABLES -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
This is not needed, as the policy on the OUTPUT chain is already ACCEPT.
Regards
Anders Fugmann
^ permalink raw reply
* SE Linux article on newsforge
From: Russell Coker @ 2003-01-09 15:01 UTC (permalink / raw)
To: selinux
http://newsforge.com/newsforge/03/01/07/2134248.shtml?tid=46
It's about the OSD group and their courseware for SE Linux (which costs $1495
per session - US dollars I presume) and Mark Westerman's commercial release
of SELinux.
It also mentions that LPI are interested in developing a certification for SE
Linux.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply
* Re: Requested: CMI8330 testers?
From: Bernard Urban @ 2003-01-09 15:00 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Bernard Urban, alsa-devel
In-Reply-To: <s5h65szajak.wl@alsa2.suse.de>
Takashi Iwai <tiwai@suse.de> writes:
[...]
> echo "xquake 0 0 direct" > /proc/asound/card0/pcm0p/oss
>
> please check alsa-kernel/Documentation/ALSA-Configuration.txt for
> details.
>
>
> > Now the AMD K6-II with a SB Vibra 16X PnP: runs with snd-sb16. In the
> > mixer I must force the 16 bit DMA to be allocated to Capture
> > to have PCM sound for all kind of audio formats. If set to Auto, for instance
> > .au format is not recognized. Also, xquake runs and produces sound only with
> > option 8bits sound.
>
> perhaps this is also related with the above.
Yes, this works ! No more flag for 8 bits sound required.
I missed it the first time, as what you need
actually is:
echo "xquake.real 0 0 direct" > /proc/asound/card0/pcm0p/oss
(xquake is a shell wrapper for the real binary xquake.real)
> > quakeforge works well, but there is a time lag in
> > producing sound, which does not exist with the OSS driver.
> > Tuning snd-mixahead does not help.
>
> this is not sure. does the delay happen only on quake or do you mean
> it generally? if it's general behavior, then it's easier to debug.
> anyway we need to trace at which point the delay occurs.
It is not general behaviour, alas. More specifically:
quakeforge with alsa sound output and alsa driver has the time lag
(nearly 0.5 second).
quakeforge with OSS sound output and OSS 'sb' driver works well.
quakeforge with OSS sound output and alsa OSS emulation driver
works well, using:
echo "nq-glx 0 0 direct" > /proc/asound/card0/pcm0p/oss
but when you quit, the program locks itself (no machine crash, only
the program is blocked, you need to kill it).
Using quake2forge (a quake2 port, without alsa support) under alsa
OSS emulation driver with:
echo "quake2 0 0 direct" > /proc/asound/card0/pcm0p/oss
it works also well, but same program lock when quitting as with quakeforge.
I will try to investigate where it blocks (last message is about DMA
buffer release).
Regards.
--
Bernard Urban
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply
* RE: [2.5 patch] small cleanups for arch/cris/drivers/serial.c
From: Mikael Starvik @ 2003-01-09 15:05 UTC (permalink / raw)
To: 'Adrian Bunk', Bjorn Wesen, dev-etrax
Cc: 'linux-kernel@vger.kernel.org'
We have already done this locally but has not yet been able to
get Linus to apply a patch to update CRIS architecture to 2.5
status.
I suggest that Linus does not apply this patch and instead
applies our patch that will get CRIS up to date with 2.5.55
(will be sent to Linus within the next hour).
Thanks for caring about our architecture!
/Mikael
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Adrian Bunk
Sent: Thursday, January 09, 2003 3:57 PM
To: Bjorn Wesen; dev-etrax
Cc: linux-kernel@vger.kernel.org
Subject: [2.5 patch] small cleanups for arch/cris/drivers/serial.c
The patch below makes the following changes to
arch/cris/drivers/serial.c:
- remove #if'd kernel 2.0 and 2.2 compatibility code
- remove an unused #define MIN
cu
Adrian
--- linux-2.5.55/arch/cris/drivers/serial.c.old 2003-01-09 15:42:43.000000000 +0100
+++ linux-2.5.55/arch/cris/drivers/serial.c 2003-01-09 15:53:52.000000000 +0100
@@ -301,12 +301,8 @@
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/slab.h>
-#if (LINUX_VERSION_CODE >= 131343)
#include <linux/init.h>
-#endif
-#if (LINUX_VERSION_CODE >= 131336)
#include <asm/uaccess.h>
-#endif
#include <linux/kernel.h>
#include <asm/io.h>
@@ -323,14 +319,6 @@
/* while we keep our own stuff (struct e100_serial) in a local .h file */
#include "serial.h"
-/*
- * All of the compatibilty code so we can compile serial.c against
- * older kernels is hidden in serial_compat.h
- */
-#if defined(LOCAL_HEADERS) || (LINUX_VERSION_CODE < 0x020317) /* 2.3.23 */
-#include "serial_compat.h"
-#endif
-
#define _INLINE_ inline
static DECLARE_TASK_QUEUE(tq_serial);
@@ -639,10 +627,6 @@
#define E100_DSR_GET(info) ((*e100_modem_pins[(info)->line].port) & (1 << e100_modem_pins[(info)->line].dsr_bit))
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
/*
* tmp_buf is used as a temporary buffer by serial_write. We need to
* lock it in case the memcpy_fromfs blocks while swapping in a page,
@@ -1648,12 +1632,8 @@
restore_flags(flags);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,66)
/* this includes a check for low-latency */
tty_flip_buffer_push(tty);
-#else
- queue_task_irq_off(&tty->flip.tqueue, &tq_timer);
-#endif
/* unthrottle if we have throttled */
if (E100_RTS_GET(info) &&
@@ -2600,9 +2580,7 @@
info->type = new_serial.type;
info->close_delay = new_serial.close_delay;
info->closing_wait = new_serial.closing_wait;
-#if (LINUX_VERSION_CODE > 0x20100)
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-#endif
check_and_exit:
if (info->flags & ASYNC_INITIALIZED) {
@@ -2775,41 +2753,6 @@
/*
* This routine sends a break character out the serial port.
*/
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
-static void
-send_break(struct e100_serial * info, int duration)
-{
- unsigned long flags;
-
- if (!info->port)
- return;
-
- current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + duration;
-
- save_flags(flags);
- cli();
-
- /* Go to manual mode and set the txd pin to 0 */
-
- info->tx_ctrl &= 0x3F; /* Clear bit 7 (txd) and 6 (tr_enable) */
- info->port[REG_TR_CTRL] = info->tx_ctrl;
-
- /* wait for "duration" jiffies */
-
- schedule();
-
- info->tx_ctrl |= (0x80 | 0x40); /* Set bit 7 (txd) and 6 (tr_enable) */
- info->port[REG_TR_CTRL] = info->tx_ctrl;
-
- /* the DMA gets awfully confused if we toggle the tranceiver like this
- * so we need to reset it
- */
- *info->ocmdadr = 4;
-
- restore_flags(flags);
-}
-#else
static void
rs_break(struct tty_struct *tty, int break_state)
{
@@ -2830,19 +2773,15 @@
info->port[REG_TR_CTRL] = info->tx_ctrl;
restore_flags(flags);
}
-#endif
static int
rs_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg)
{
struct e100_serial * info = (struct e100_serial *)tty->driver_data;
-#if defined(CONFIG_ETRAX_RS485) || (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
+#if defined(CONFIG_ETRAX_RS485)
int error;
#endif
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
- int retval;
-#endif
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) &&
@@ -2852,45 +2791,6 @@
}
switch (cmd) {
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
- case TCSBRK: /* SVID version: non-zero arg --> no break */
- retval = tty_check_change(tty);
- if (retval)
- return retval;
- tty_wait_until_sent(tty, 0);
- if (signal_pending(current))
- return -EINTR;
- if (!arg) {
- send_break(info, HZ/4); /* 1/4 second */
- if (signal_pending(current))
- return -EINTR;
- }
- return 0;
- case TCSBRKP: /* support for POSIX tcsendbreak() */
- retval = tty_check_change(tty);
- if (retval)
- return retval;
- tty_wait_until_sent(tty, 0);
- if (signal_pending(current))
- return -EINTR;
- send_break(info, arg ? arg*(HZ/10) : HZ/4);
- if (signal_pending(current))
- return -EINTR;
- return 0;
- case TIOCGSOFTCAR:
- error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(long));
- if (error)
- return error;
- put_fs_long(C_CLOCAL(tty) ? 1 : 0,
- (unsigned long *) arg);
- return 0;
- case TIOCSSOFTCAR:
- arg = get_fs_long((unsigned long *) arg);
- tty->termios->c_cflag =
- ((tty->termios->c_cflag & ~CLOCAL) |
- (arg ? CLOCAL : 0));
- return 0;
-#endif
case TIOCMGET:
return get_modem_info(info, (unsigned int *) arg);
case TIOCMBIS:
@@ -3311,9 +3211,7 @@
tty->driver_data = info;
info->tty = tty;
-#if (LINUX_VERSION_CODE > 0x20100)
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-#endif
if (!tmp_buf) {
page = get_zeroed_page(GFP_KERNEL);
@@ -3497,9 +3395,7 @@
memset(&serial_driver, 0, sizeof(struct tty_driver));
serial_driver.magic = TTY_DRIVER_MAGIC;
-#if (LINUX_VERSION_CODE > 0x20100)
serial_driver.driver_name = "serial";
-#endif
serial_driver.name = "ttyS";
serial_driver.major = TTY_MAJOR;
serial_driver.minor_start = 64;
@@ -3530,14 +3426,10 @@
serial_driver.stop = rs_stop;
serial_driver.start = rs_start;
serial_driver.hangup = rs_hangup;
-#if (LINUX_VERSION_CODE >= 131394) /* Linux 2.1.66 */
serial_driver.break_ctl = rs_break;
-#endif
-#if (LINUX_VERSION_CODE >= 131343)
serial_driver.send_xchar = rs_send_xchar;
serial_driver.wait_until_sent = rs_wait_until_sent;
serial_driver.read_proc = rs_read_proc;
-#endif
/*
* The callout device is just like normal device except for
@@ -3547,10 +3439,8 @@
callout_driver.name = "cua";
callout_driver.major = TTYAUX_MAJOR;
callout_driver.subtype = SERIAL_TYPE_CALLOUT;
-#if (LINUX_VERSION_CODE >= 131343)
callout_driver.read_proc = 0;
callout_driver.proc_entry = 0;
-#endif
if (tty_register_driver(&serial_driver))
panic("Couldn't register serial driver\n");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* [PATCH] ip_conntrack_ftp.c: cosmetic typo fix in debug macro
From: Harald Welte @ 2003-01-09 14:51 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Filip Sneppe (Cronos)" <filip.sneppe@cronos.be>
Cosmetic Fix:
Fixes a typo in a DEBUG statement (which is contained in an "#if 0" block,
so this would never end up causing a problem).
diff -Nru --exclude .depend --exclude *.o --exclude *.ver --exclude .*.flags --exclude *.orig --exclude *.rej --exclude *~ linux-2.4.20-plain/net/ipv4/netfilter/ip_conntrack_ftp.c linux-2.4.20-debugftp/net/ipv4/netfilter/ip_conntrack_ftp.c
--- linux-2.4.20-plain/net/ipv4/netfilter/ip_conntrack_ftp.c Fri Nov 29 00:53:15 2002
+++ linux-2.4.20-debugftp/net/ipv4/netfilter/ip_conntrack_ftp.c Wed Jan 8 12:02:28 2003
@@ -200,9 +200,9 @@
DEBUGP("ftp: string mismatch\n");
for (i = 0; i < plen; i++) {
- DEBUGFTP("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
- i, data[i], data[i],
- pattern[i], pattern[i]);
+ DEBUGP("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
+ i, data[i], data[i],
+ pattern[i], pattern[i]);
}
#endif
return 0;
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [PATCH] ECN target wrong tcp csum on little endian
From: Harald Welte @ 2003-01-09 14:50 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Patrick McHardy <kaber@trash.net>
The 2.4.20 kernel included the new iptables 'ECN' target, enabling a selective
ECN disable mechanism. Unfortunately there was a bug in the incremental TCP
checksum update, resulting in broken TCP checksums on little endian machines.
This patch fixes the Bug.
--- linux.old/net/ipv4/netfilter/ipt_ECN.c.orig 2002-12-09 23:14:20.000000000 +0100
+++ linux/net/ipv4/netfilter/ipt_ECN.c 2002-12-09 23:13:27.000000000 +0100
@@ -88,8 +88,8 @@
}
if (diffs[0] != *tcpflags) {
- diffs[0] = htons(diffs[0]) ^ 0xFFFF;
- diffs[1] = htons(*tcpflags);
+ diffs[0] = diffs[0] ^ 0xFFFF;
+ diffs[1] = *tcpflags;
tcph->check = csum_fold(csum_partial((char *)diffs,
sizeof(diffs),
tcph->check^0xFFFF));
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [2.5 patch] small cleanups for arch/cris/drivers/serial.c
From: Adrian Bunk @ 2003-01-09 14:56 UTC (permalink / raw)
To: bjornw, dev-etrax; +Cc: linux-kernel
The patch below makes the following changes to
arch/cris/drivers/serial.c:
- remove #if'd kernel 2.0 and 2.2 compatibility code
- remove an unused #define MIN
cu
Adrian
--- linux-2.5.55/arch/cris/drivers/serial.c.old 2003-01-09 15:42:43.000000000 +0100
+++ linux-2.5.55/arch/cris/drivers/serial.c 2003-01-09 15:53:52.000000000 +0100
@@ -301,12 +301,8 @@
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/slab.h>
-#if (LINUX_VERSION_CODE >= 131343)
#include <linux/init.h>
-#endif
-#if (LINUX_VERSION_CODE >= 131336)
#include <asm/uaccess.h>
-#endif
#include <linux/kernel.h>
#include <asm/io.h>
@@ -323,14 +319,6 @@
/* while we keep our own stuff (struct e100_serial) in a local .h file */
#include "serial.h"
-/*
- * All of the compatibilty code so we can compile serial.c against
- * older kernels is hidden in serial_compat.h
- */
-#if defined(LOCAL_HEADERS) || (LINUX_VERSION_CODE < 0x020317) /* 2.3.23 */
-#include "serial_compat.h"
-#endif
-
#define _INLINE_ inline
static DECLARE_TASK_QUEUE(tq_serial);
@@ -639,10 +627,6 @@
#define E100_DSR_GET(info) ((*e100_modem_pins[(info)->line].port) & (1 << e100_modem_pins[(info)->line].dsr_bit))
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
/*
* tmp_buf is used as a temporary buffer by serial_write. We need to
* lock it in case the memcpy_fromfs blocks while swapping in a page,
@@ -1648,12 +1632,8 @@
restore_flags(flags);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,66)
/* this includes a check for low-latency */
tty_flip_buffer_push(tty);
-#else
- queue_task_irq_off(&tty->flip.tqueue, &tq_timer);
-#endif
/* unthrottle if we have throttled */
if (E100_RTS_GET(info) &&
@@ -2600,9 +2580,7 @@
info->type = new_serial.type;
info->close_delay = new_serial.close_delay;
info->closing_wait = new_serial.closing_wait;
-#if (LINUX_VERSION_CODE > 0x20100)
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-#endif
check_and_exit:
if (info->flags & ASYNC_INITIALIZED) {
@@ -2775,41 +2753,6 @@
/*
* This routine sends a break character out the serial port.
*/
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
-static void
-send_break(struct e100_serial * info, int duration)
-{
- unsigned long flags;
-
- if (!info->port)
- return;
-
- current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + duration;
-
- save_flags(flags);
- cli();
-
- /* Go to manual mode and set the txd pin to 0 */
-
- info->tx_ctrl &= 0x3F; /* Clear bit 7 (txd) and 6 (tr_enable) */
- info->port[REG_TR_CTRL] = info->tx_ctrl;
-
- /* wait for "duration" jiffies */
-
- schedule();
-
- info->tx_ctrl |= (0x80 | 0x40); /* Set bit 7 (txd) and 6 (tr_enable) */
- info->port[REG_TR_CTRL] = info->tx_ctrl;
-
- /* the DMA gets awfully confused if we toggle the tranceiver like this
- * so we need to reset it
- */
- *info->ocmdadr = 4;
-
- restore_flags(flags);
-}
-#else
static void
rs_break(struct tty_struct *tty, int break_state)
{
@@ -2830,19 +2773,15 @@
info->port[REG_TR_CTRL] = info->tx_ctrl;
restore_flags(flags);
}
-#endif
static int
rs_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg)
{
struct e100_serial * info = (struct e100_serial *)tty->driver_data;
-#if defined(CONFIG_ETRAX_RS485) || (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
+#if defined(CONFIG_ETRAX_RS485)
int error;
#endif
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
- int retval;
-#endif
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) &&
@@ -2852,45 +2791,6 @@
}
switch (cmd) {
-#if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */
- case TCSBRK: /* SVID version: non-zero arg --> no break */
- retval = tty_check_change(tty);
- if (retval)
- return retval;
- tty_wait_until_sent(tty, 0);
- if (signal_pending(current))
- return -EINTR;
- if (!arg) {
- send_break(info, HZ/4); /* 1/4 second */
- if (signal_pending(current))
- return -EINTR;
- }
- return 0;
- case TCSBRKP: /* support for POSIX tcsendbreak() */
- retval = tty_check_change(tty);
- if (retval)
- return retval;
- tty_wait_until_sent(tty, 0);
- if (signal_pending(current))
- return -EINTR;
- send_break(info, arg ? arg*(HZ/10) : HZ/4);
- if (signal_pending(current))
- return -EINTR;
- return 0;
- case TIOCGSOFTCAR:
- error = verify_area(VERIFY_WRITE, (void *) arg,sizeof(long));
- if (error)
- return error;
- put_fs_long(C_CLOCAL(tty) ? 1 : 0,
- (unsigned long *) arg);
- return 0;
- case TIOCSSOFTCAR:
- arg = get_fs_long((unsigned long *) arg);
- tty->termios->c_cflag =
- ((tty->termios->c_cflag & ~CLOCAL) |
- (arg ? CLOCAL : 0));
- return 0;
-#endif
case TIOCMGET:
return get_modem_info(info, (unsigned int *) arg);
case TIOCMBIS:
@@ -3311,9 +3211,7 @@
tty->driver_data = info;
info->tty = tty;
-#if (LINUX_VERSION_CODE > 0x20100)
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-#endif
if (!tmp_buf) {
page = get_zeroed_page(GFP_KERNEL);
@@ -3497,9 +3395,7 @@
memset(&serial_driver, 0, sizeof(struct tty_driver));
serial_driver.magic = TTY_DRIVER_MAGIC;
-#if (LINUX_VERSION_CODE > 0x20100)
serial_driver.driver_name = "serial";
-#endif
serial_driver.name = "ttyS";
serial_driver.major = TTY_MAJOR;
serial_driver.minor_start = 64;
@@ -3530,14 +3426,10 @@
serial_driver.stop = rs_stop;
serial_driver.start = rs_start;
serial_driver.hangup = rs_hangup;
-#if (LINUX_VERSION_CODE >= 131394) /* Linux 2.1.66 */
serial_driver.break_ctl = rs_break;
-#endif
-#if (LINUX_VERSION_CODE >= 131343)
serial_driver.send_xchar = rs_send_xchar;
serial_driver.wait_until_sent = rs_wait_until_sent;
serial_driver.read_proc = rs_read_proc;
-#endif
/*
* The callout device is just like normal device except for
@@ -3547,10 +3439,8 @@
callout_driver.name = "cua";
callout_driver.major = TTYAUX_MAJOR;
callout_driver.subtype = SERIAL_TYPE_CALLOUT;
-#if (LINUX_VERSION_CODE >= 131343)
callout_driver.read_proc = 0;
callout_driver.proc_entry = 0;
-#endif
if (tty_register_driver(&serial_driver))
panic("Couldn't register serial driver\n");
^ permalink raw reply
* [PATCH] ipt_REJECT shouldn't send replies for wrong udp csum
From: Harald Welte @ 2003-01-09 14:47 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
As 2.4.20 came out with newnat included, there were several reports on
excessive logging of reused FTP expectations.
The patch fixes the problem by separating the two possible cases:
when the conntrack helper is registered with the reuse flag enabled, then
the logging is converted to debugging (not enabled by default), otherwise
the logging is kept to notify the admin on the violation of the given protocol.
diff -Nru --exclude .depend --exclude *.o --exclude *.ver --exclude .*.flags --exclude *.orig --exclude *.rej --exclude *~ linux-2.4.20-plain/net/ipv4/netfilter/ip_conntrack_core.c linux-2.4.20-ftp/net/ipv4/netfilter/ip_conntrack_core.c
--- linux-2.4.20-plain/net/ipv4/netfilter/ip_conntrack_core.c Fri Nov 29 00:53:15 2002
+++ linux-2.4.20-ftp/net/ipv4/netfilter/ip_conntrack_core.c Tue Jan 7 19:43:29 2003
@@ -966,23 +966,28 @@
related_to->expecting >= related_to->helper->max_expected) {
struct list_head *cur_item;
/* old == NULL */
- if (net_ratelimit())
- printk(KERN_WARNING
- "ip_conntrack: max number of expected "
- "connections %i of %s reached for "
- "%u.%u.%u.%u->%u.%u.%u.%u%s\n",
- related_to->helper->max_expected,
- related_to->helper->name,
- NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
- NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip),
- related_to->helper->flags & IP_CT_HELPER_F_REUSE_EXPECT ?
- ", reusing" : "");
if (!(related_to->helper->flags &
IP_CT_HELPER_F_REUSE_EXPECT)) {
WRITE_UNLOCK(&ip_conntrack_lock);
+ if (net_ratelimit())
+ printk(KERN_WARNING
+ "ip_conntrack: max number of expected "
+ "connections %i of %s reached for "
+ "%u.%u.%u.%u->%u.%u.%u.%u\n",
+ related_to->helper->max_expected,
+ related_to->helper->name,
+ NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
+ NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
return -EPERM;
}
-
+ DEBUGP("ip_conntrack: max number of expected "
+ "connections %i of %s reached for "
+ "%u.%u.%u.%u->%u.%u.%u.%u, reusing\n",
+ related_to->helper->max_expected,
+ related_to->helper->name,
+ NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip),
+ NIPQUAD(related_to->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip));
+
/* choose the the oldest expectation to evict */
list_for_each(cur_item, &related_to->sibling_list) {
struct ip_conntrack_expect *cur;
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [PATCH] ipt_REJECT shouldn't send replies for wrong udp csum
From: Harald Welte @ 2003-01-09 14:46 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Patrick McHardy <kaber@trash.net>
ipt_REJECT sends unreachables in response to UDP packets with invalid
checksums, thereby exposing the existance of a firewall (as described
in phrack #60, "broken crc firewall spotting" (or something like this),
www.phrack.com). The patch makes ipt_REJECT verify UDP checksums if
set.
diff -urN linux-2.4.21-pre2-clean/net/ipv4/netfilter/ipt_REJECT.c linux-2.4.21-pre2/net/ipv4/netfilter/ipt_REJECT.c
--- linux-2.4.21-pre2-clean/net/ipv4/netfilter/ipt_REJECT.c 2002-11-29 00:53:15.000000000 +0100
+++ linux-2.4.21-pre2/net/ipv4/netfilter/ipt_REJECT.c 2003-01-05 19:59:27.000000000 +0100
@@ -6,6 +6,8 @@
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
+#include <linux/udp.h>
+#include <linux/icmp.h>
#include <net/icmp.h>
#include <net/ip.h>
#include <net/tcp.h>
@@ -157,6 +159,7 @@
static void send_unreach(struct sk_buff *skb_in, int code)
{
struct iphdr *iph;
+ struct udphdr *udph;
struct icmphdr *icmph;
struct sk_buff *nskb;
u32 saddr;
@@ -186,6 +189,19 @@
if (iph->frag_off&htons(IP_OFFSET))
return;
+ /* if UDP checksum is set, verify it's correct */
+ if (iph->protocol == IPPROTO_UDP
+ && skb_in->tail-(u8*)iph >= sizeof(struct udphdr)) {
+ int datalen = skb_in->len - (iph->ihl<<2);
+ udph = (struct udphdr *)((char *)iph + (iph->ihl<<2));
+ if (udph->check
+ && csum_tcpudp_magic(iph->saddr, iph->daddr,
+ datalen, IPPROTO_UDP,
+ csum_partial((char *)udph, datalen,
+ 0)) != 0)
+ return;
+ }
+
/* If we send an ICMP error to an ICMP error a mess would result.. */
if (iph->protocol == IPPROTO_ICMP
&& skb_in->tail-(u8*)iph >= sizeof(struct icmphdr)) {
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [TRIVIAL] mmap.c corner case fix
From: DervishD @ 2003-01-09 14:56 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux-kernel
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
Hi Marcelo :)
This patch fixes a corner case on the mmap() syscall.
The patch is from David S. Miller, not me. My patch was
incomplete and did nothing on 'big TASK_SIZE' architectures.
The patch is against both 2.4.20 and 2.4.21-pre1, is just the same.
Raúl
[-- Attachment #2: mmap.c.diff for 2.4.20 and 2.4.21-pre --]
[-- Type: text/plain, Size: 407 bytes --]
--- linux/mm/mmap.c.orig 2002-12-11 13:59:37.000000000 +0100
+++ linux/mm/mmap.c 2002-12-11 14:01:16.000000000 +0100
@@ -403,10 +403,12 @@
if (file && (!file->f_op || !file->f_op->mmap))
return -ENODEV;
- if ((len = PAGE_ALIGN(len)) == 0)
+ if (!len)
return addr;
- if (len > TASK_SIZE)
+ len = PAGE_ALIGN(len);
+
+ if (len > TASK_SIZE || len == 0)
return -EINVAL;
/* offset overflow? */
^ permalink raw reply
* [LARTC] Shaping on multiple interfaces results in losing the box
From: Corey Rogers @ 2003-01-09 14:45 UTC (permalink / raw)
To: lartc
Hi, I'm using the latest HTB patch on a custom 2.4.18 kernel. The
kernels either include freeswan 1.98b or super-freeswan 1.99.
When i attempt to shape on 1 interface .... no problem. I can do this to
any interface on the linux box including.
The minute I add the second set of shaping commands to another ethernet
interface I lose the box.
I normally set the box to reboot in a certain time when i'm running
these scripts however the box does not reboot and is rendered
unaccessible unless I'm on site.
I also as a precaution allow the script to sleep for a period of time
after which it clears the shaping from the interfaces ... it doesn't
take.
I recently tried this in house on 2 test systems. However using kernel
2.4.20 with HTB etc enabled and installed super-freeswan 1.99 as
packaged by Ken Bantoft. As with the machines I lost ... freeswan is not
active. I atempted to shape 2 of the 4 interfaces on the machines ... IT
WORKED.
Problem is the machines in the field are currently live. I can't bring
them down until after hours or late on weekends. And I would have no one
there to reset the systems.
Any ideas as to why this is happening and or how to stop this?
--
Corey Rogers <jrog@sunbeach.net>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply
* [PATCH] udp nat helper support
From: Harald Welte @ 2003-01-09 14:45 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 9748 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Brian J. Murrell <netfilter@interlinx.bc.ca>
This patch is necessarry for UDP nat helpers (like Amanda protocol)
- make ip_nat_resize_packet() more generic (TCP and UDP)
- add ip_nat_mangle_udp_packet() function similar to
ip_nat_mangle_tcp_packet()
diff -Nur --exclude '*~' --exclude '*.orig' linux-2.4.19-16mdk/include/linux/netfilter_ipv4/ip_nat_helper.h linux-2.4.19-16mdk.tmp/include/linux/netfilter_ipv4/ip_nat_helper.h
--- linux-2.4.19-16mdk/include/linux/netfilter_ipv4/ip_nat_helper.h 2002-10-09 04:52:29.000000000 -0400
+++ linux-2.4.19-16mdk.tmp/include/linux/netfilter_ipv4/ip_nat_helper.h 2002-10-17 11:07:43.000000000 -0400
@@ -50,6 +50,13 @@
unsigned int match_len,
char *rep_buffer,
unsigned int rep_len);
+extern int ip_nat_mangle_udp_packet(struct sk_buff **skb,
+ struct ip_conntrack *ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned int match_offset,
+ unsigned int match_len,
+ char *rep_buffer,
+ unsigned int rep_len);
extern int ip_nat_seq_adjust(struct sk_buff *skb,
struct ip_conntrack *ct,
enum ip_conntrack_info ctinfo);
diff -Nur --exclude '*~' --exclude '*.orig' linux-2.4.19-16mdk/net/ipv4/netfilter/ip_nat_helper.c linux-2.4.19-16mdk.tmp/net/ipv4/netfilter/ip_nat_helper.c
--- linux-2.4.19-16mdk/net/ipv4/netfilter/ip_nat_helper.c 2002-09-20 09:44:35.000000000 -0400
+++ linux-2.4.19-16mdk.tmp/net/ipv4/netfilter/ip_nat_helper.c 2002-10-17 11:15:35.000000000 -0400
@@ -8,6 +8,9 @@
* - add support for SACK adjustment
* 14 Mar 2002 Harald Welte <laforge@gnumonks.org>:
* - merge SACK support into newnat API
+ * 16 Aug 2002 Brian J. Murrell <netfilter@interlinx.bc.ca>:
+ * - make ip_nat_resize_packet more generic (TCP and UDP)
+ * - add ip_nat_mangle_udp_packet
*/
#include <linux/version.h>
#include <linux/config.h>
@@ -22,6 +25,7 @@
#include <net/icmp.h>
#include <net/ip.h>
#include <net/tcp.h>
+#include <net/udp.h>
#define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_nat_lock)
#define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_nat_lock)
@@ -51,18 +55,12 @@
int new_size)
{
struct iphdr *iph;
- struct tcphdr *tcph;
- void *data;
int dir;
struct ip_nat_seq *this_way, *other_way;
DEBUGP("ip_nat_resize_packet: old_size = %u, new_size = %u\n",
(*skb)->len, new_size);
- iph = (*skb)->nh.iph;
- tcph = (void *)iph + iph->ihl*4;
- data = (void *)tcph + tcph->doff*4;
-
dir = CTINFO2DIR(ctinfo);
this_way = &ct->nat.info.seq[dir];
@@ -84,37 +82,41 @@
}
iph = (*skb)->nh.iph;
- tcph = (void *)iph + iph->ihl*4;
- data = (void *)tcph + tcph->doff*4;
-
- DEBUGP("ip_nat_resize_packet: Seq_offset before: ");
- DUMP_OFFSET(this_way);
+ if (iph->protocol == IPPROTO_TCP) {
+ struct tcphdr *tcph = (void *)iph + iph->ihl*4;
+ void *data = (void *)tcph + tcph->doff*4;
+
+ DEBUGP("ip_nat_resize_packet: Seq_offset before: ");
+ DUMP_OFFSET(this_way);
+
+ LOCK_BH(&ip_nat_seqofs_lock);
+
+ /* SYN adjust. If it's uninitialized, of this is after last
+ * correction, record it: we don't handle more than one
+ * adjustment in the window, but do deal with common case of a
+ * retransmit */
+ if (this_way->offset_before == this_way->offset_after
+ || before(this_way->correction_pos, ntohl(tcph->seq))) {
+ this_way->correction_pos = ntohl(tcph->seq);
+ this_way->offset_before = this_way->offset_after;
+ this_way->offset_after = (int32_t)
+ this_way->offset_before + new_size -
+ (*skb)->len;
+ }
- LOCK_BH(&ip_nat_seqofs_lock);
+ UNLOCK_BH(&ip_nat_seqofs_lock);
- /* SYN adjust. If it's uninitialized, of this is after last
- * correction, record it: we don't handle more than one
- * adjustment in the window, but do deal with common case of a
- * retransmit */
- if (this_way->offset_before == this_way->offset_after
- || before(this_way->correction_pos, ntohl(tcph->seq))) {
- this_way->correction_pos = ntohl(tcph->seq);
- this_way->offset_before = this_way->offset_after;
- this_way->offset_after = (int32_t)
- this_way->offset_before + new_size - (*skb)->len;
+ DEBUGP("ip_nat_resize_packet: Seq_offset after: ");
+ DUMP_OFFSET(this_way);
}
-
- UNLOCK_BH(&ip_nat_seqofs_lock);
-
- DEBUGP("ip_nat_resize_packet: Seq_offset after: ");
- DUMP_OFFSET(this_way);
return 1;
}
/* Generic function for mangling variable-length address changes inside
- * NATed connections (like the PORT XXX,XXX,XXX,XXX,XXX,XXX command in FTP).
+ * NATed TCP connections (like the PORT XXX,XXX,XXX,XXX,XXX,XXX
+ * command in FTP).
*
* Takes care about all the nasty sequence number changes, checksumming,
* skb enlargement, ...
@@ -174,10 +176,11 @@
tcph = (void *)iph + iph->ihl*4;
data = (void *)tcph + tcph->doff*4;
- /* move post-replacement */
- memmove(data + match_offset + rep_len,
- data + match_offset + match_len,
- (*skb)->tail - (data + match_offset + match_len));
+ if (rep_len != match_len)
+ /* move post-replacement */
+ memmove(data + match_offset + rep_len,
+ data + match_offset + match_len,
+ (*skb)->tail - (data + match_offset + match_len));
/* insert data from buffer */
memcpy(data + match_offset, rep_buffer, rep_len);
@@ -207,6 +210,114 @@
return 1;
}
+
+/* Generic function for mangling variable-length address changes inside
+ * NATed UDP connections (like the CONNECT DATA XXXXX MESG XXXXX INDEX XXXXX
+ * command in the Amanda protocol)
+ *
+ * Takes care about all the nasty sequence number changes, checksumming,
+ * skb enlargement, ...
+ *
+ * XXX - This function could be merged with ip_nat_mangle_tcp_packet which
+ * should be fairly easy to do.
+ */
+int
+ip_nat_mangle_udp_packet(struct sk_buff **skb,
+ struct ip_conntrack *ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned int match_offset,
+ unsigned int match_len,
+ char *rep_buffer,
+ unsigned int rep_len)
+{
+ struct iphdr *iph = (*skb)->nh.iph;
+ struct udphdr *udph = (void *)iph + iph->ihl * 4;
+ unsigned char *data;
+ u_int32_t udplen, newlen, newudplen;
+
+ udplen = (*skb)->len - iph->ihl*4;
+ newudplen = udplen - match_len + rep_len;
+ newlen = iph->ihl*4 + newudplen;
+
+ if (newlen > 65535) {
+ if (net_ratelimit())
+ printk("ip_nat_mangle_udp_packet: nat'ed packet "
+ "exceeds maximum packet size\n");
+ return 0;
+ }
+
+ if ((*skb)->len != newlen) {
+ if (!ip_nat_resize_packet(skb, ct, ctinfo, newlen)) {
+ printk("resize_packet failed!!\n");
+ return 0;
+ }
+ }
+
+ /* Alexey says: if a hook changes _data_ ... it can break
+ original packet sitting in tcp queue and this is fatal */
+ if (skb_cloned(*skb)) {
+ struct sk_buff *nskb = skb_copy(*skb, GFP_ATOMIC);
+ if (!nskb) {
+ if (net_ratelimit())
+ printk("Out of memory cloning TCP packet\n");
+ return 0;
+ }
+ /* Rest of kernel will get very unhappy if we pass it
+ a suddenly-orphaned skbuff */
+ if ((*skb)->sk)
+ skb_set_owner_w(nskb, (*skb)->sk);
+ kfree_skb(*skb);
+ *skb = nskb;
+ }
+
+ /* skb may be copied !! */
+ iph = (*skb)->nh.iph;
+ udph = (void *)iph + iph->ihl*4;
+ data = (void *)udph + sizeof(struct udphdr);
+
+ if (rep_len != match_len)
+ /* move post-replacement */
+ memmove(data + match_offset + rep_len,
+ data + match_offset + match_len,
+ (*skb)->tail - (data + match_offset + match_len));
+
+ /* insert data from buffer */
+ memcpy(data + match_offset, rep_buffer, rep_len);
+
+ /* update skb info */
+ if (newlen > (*skb)->len) {
+ DEBUGP("ip_nat_mangle_udp_packet: Extending packet by "
+ "%u to %u bytes\n", newlen - (*skb)->len, newlen);
+ skb_put(*skb, newlen - (*skb)->len);
+ } else {
+ DEBUGP("ip_nat_mangle_udp_packet: Shrinking packet from "
+ "%u to %u bytes\n", (*skb)->len, newlen);
+ skb_trim(*skb, newlen);
+ }
+
+ /* update the length of the UDP and IP packets to the new values*/
+ udph->len = htons((*skb)->len - iph->ihl*4);
+ iph->tot_len = htons(newlen);
+
+ /* fix udp checksum if udp checksum was previously calculated */
+ if ((*skb)->csum != 0) {
+ (*skb)->csum = csum_partial((char *)udph +
+ sizeof(struct udphdr),
+ newudplen - sizeof(struct udphdr),
+ 0);
+
+ udph->check = 0;
+ udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr,
+ newudplen, IPPROTO_UDP,
+ csum_partial((char *)udph,
+ sizeof(struct udphdr),
+ (*skb)->csum));
+ }
+
+ ip_send_check(iph);
+
+ return 1;
+}
/* Adjust one found SACK option including checksum correction */
static void
diff -Nur --exclude '*~' --exclude '*.orig' linux-2.4.19-16mdk/net/ipv4/netfilter/ip_nat_standalone.c linux-2.4.19-16mdk.tmp/net/ipv4/netfilter/ip_nat_standalone.c
--- linux-2.4.19-16mdk/net/ipv4/netfilter/ip_nat_standalone.c 2002-09-20 09:44:36.000000000 -0400
+++ linux-2.4.19-16mdk.tmp/net/ipv4/netfilter/ip_nat_standalone.c 2002-10-17 11:16:00.000000000 -0400
@@ -358,5 +358,6 @@
EXPORT_SYMBOL(ip_nat_helper_unregister);
EXPORT_SYMBOL(ip_nat_cheat_check);
EXPORT_SYMBOL(ip_nat_mangle_tcp_packet);
+EXPORT_SYMBOL(ip_nat_mangle_udp_packet);
EXPORT_SYMBOL(ip_nat_used_tuple);
MODULE_LICENSE("GPL");
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* Oops with usb-mass-storage
From: Chrissie @ 2003-01-09 16:50 UTC (permalink / raw)
To: mdharm-usb, linux-kernel, sjr, eyesee, anti, thomas.hechelhammer
Hello!
I bought the digital still camera Praktica DC21. It is one of the
cheaper models with usb-storage emulation. Under win98, the camera works
well and appears as an additional drive in explorer, after i had the
drive-INF-file installed. The camera is a sony-based oem-version, i found
out. You can look for addidional Informations of the camera at
www.praktica.de.
I thought, it should be possible to use every usb mass storage device with
compact flash card under linux. But the first time i plugged in the camera
onto the usb-port, i could not even think about mounting it.
The device identifies as following:
chrissie@balearen:~$ cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=084d ProdID=0011 Rev= 1.10
S: Manufacturer=
S: Product=DC2MEGA
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I added the device in unusual_devs.h.
// added by chrissie
UNUSUAL_DEV (0x084d, 0x0011, 0x0001, 0x9999,
"Praktika D2MEGA",
"Digital Camera",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_MODE_XLATE ),
Then i compiled and installed the modules.
I am using Debian Linux 3.0r1, with an kernel 2.4.20, self-compiled.
chrissie@balearen:~$ uname -a
Linux balearen 2.4.20 #8 Thu Jan 9 15:55:10 CET 2003 i686 unknown
Now, i get the following output in dmesg after switching the camera on:
hub.c: connect-debounce failed, port 2 disabled
hub.c: new USB device 00:07.2-2, assigned address 2
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
Looks quite good, i think.
chrissie@balearen:~$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: LITEON Model: CD-ROM LTN301 Rev: ML35
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: Model: CD-R/RW RW7120A Rev: 1.10
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: DSC Model: Card Reader Rev: .
Type: Direct-Access ANSI SCSI revision: 02
The device now seems to be recogniced, and the usb-storage-to-scsi seems
to work as well.
I was very happy so far. But when i enter the following:
root@balearen:~# mount /dev/sda1 /mnt -t vfat
i get an kernel oops after following additional output to the console
usb-uhci: interrupt, status 3, frame #1976
interrupt, status 2, frame #1259
a ps -ax at another console at this time tells me, that the sd_mod is in
the state initializing.
The console now hangs for a short time, and the following kernel oops is
as follows:
usb.c: usb disconnect on device 00:07.2-2 adress 3
Unable to handle kernel NULL pointer dereference at virtual address
0000000c
printing eip
c01261d8
*pde=00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c01261d8>] Not tainted
Eflags: 0001002
eax: 00b00000 ebx: 00000093 ecx: 00000000 edx: c100001c
esi: 00000000 edi: 00000206 ebp: ce13be00 esp: c9c39de0
ds: 0018 es:0018 ss:0018
Process usb.agent (pid:1010, stackpage=c9c39000)
Stack 00000000 ce9348c0 00000000 ce13be00 c01d2b23 00000693 ce13be00
ce9348c0
00000000 ce13be00 ce13be00 d0838e50 c1338860 ce13be00 c01d202c
ce13be00
ce13be00 00000000 d083977c ce13be00 c133887c c1338860 00000000
00000000
Call trace: [<c01d2b23>] [<d0838e50>] [<c01d202c>] [<d0839852>]
[<c0107e8d>] [<c0107ff6>] [<c010a1d8>] [<c011f09b>]
[<c010eb64>]
[<c010ea04>] [<c011992c>] [<c011a904>] [<c0106cc4>]
Code: 2b 59 0c 89 d8 31 d2 f7 76 18 89 c3 86 41 14 89 44 99 18 89
<0> Kernel panic: Aiee, killing interrupt handler!
In interrupt handler: not syncing
Additionally, a LED at the keyboard is flashing.
Now, the system is dead and i have to do a hardware-reset.
Now, some additional system information:
(if interesting for you)
balearen:~# gcc --version
2.95.4
balearen:~# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo
PRO133x] (rev 44)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo
MVP3/Pro133x AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C596 ISA [Mobile South]
(rev 12)
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 08)
00:07.3 Host bridge: VIA Technologies, Inc. VT82C596 Power Management (rev
20)
00:0a.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro (rev
5c)
00:0c.0 Ethernet controller: 3Com Corporation 3c900 Combo [Boomerang]
00:0e.0 Ethernet controller: D-Link System Inc Sundance Ethernet
00:10.0 Communication controller: Conexant HSF 56k Data/Fax/Voice Modem
(rev 01)
The processor i am using is a Celeron Coppermine 733 MHz overcloced to
1100 MHz,
Well, to come to an end:
I am really interested to get this camera to work under Linux.
Can you tell me, what to do any further? I am at the end from my sight, so
far.
Matthew Dharm: i can send the camera to you for a period of time, if you
are interested.
Thanks in advance for any help!
Christian Braeunlich (chrissie)
x.chrissie.x@t-online.de
^ permalink raw reply
* [PATCH] locking fix for TCP conntrack
From: Harald Welte @ 2003-01-09 14:42 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Martin Josefsson <gandalf@wlug.westbo.se>
Fix a locking bug in ip_conntrack_proto_tcp.
--- linux-2.4.20-pre10/net/ipv4/netfilter/ip_conntrack_proto_tcp.c.meep 2002-10-24 17:05:49.000000000 +0200
+++ linux-2.4.20-pre10/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2002-10-24 17:11:19.000000000 +0200
@@ -186,13 +186,13 @@
&& tcph->syn && tcph->ack)
conntrack->proto.tcp.handshake_ack
= htonl(ntohl(tcph->seq) + 1);
- WRITE_UNLOCK(&tcp_lock);
/* If only reply is a RST, we can consider ourselves not to
have an established connection: this is a fairly common
problem case, so we can delete the conntrack
immediately. --RR */
if (!(conntrack->status & IPS_SEEN_REPLY) && tcph->rst) {
+ WRITE_UNLOCK(&tcp_lock);
if (del_timer(&conntrack->timeout))
conntrack->timeout.function((unsigned long)conntrack);
} else {
@@ -203,6 +203,7 @@
&& tcph->ack_seq == conntrack->proto.tcp.handshake_ack)
set_bit(IPS_ASSURED_BIT, &conntrack->status);
+ WRITE_UNLOCK(&tcp_lock);
ip_ct_refresh(conntrack, tcp_timeouts[newconntrack]);
}
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [PATCH] ipt_multiport invert fix
From: Harald Welte @ 2003-01-09 14:39 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
This patch fixes the ULOG target when logging packets without any
ethernet header (mac address).
--- linux-2.4.20-pre11-plain/net/ipv4/netfilter/ipt_ULOG.c Wed Oct 30 10:09:41 2002
+++ linux-2.4.20-pre11-ulogfix/net/ipv4/netfilter//ipt_ULOG.c Wed Oct 30 10:07:31 2002
@@ -12,6 +12,7 @@
* module loadtime -HW
* 2002/07/07 remove broken nflog_rcv() function -HW
* 2002/08/29 fix shifted/unshifted nlgroup bug -HW
+ * 2002/10/30 fix uninitialized mac_len field - <Anders K. Pedersen>
*
* Released under the terms of the GPL
*
@@ -31,7 +32,7 @@
* Specify, after how many clock ticks (intel: 100 per second) the queue
* should be flushed even if it is not full yet.
*
- * ipt_ULOG.c,v 1.21 2002/08/29 10:54:34 laforge Exp
+ * ipt_ULOG.c,v 1.22 2002/10/30 09:07:31 laforge Exp
*/
#include <linux/module.h>
@@ -224,7 +225,8 @@
&& in->hard_header_len <= ULOG_MAC_LEN) {
memcpy(pm->mac, (*pskb)->mac.raw, in->hard_header_len);
pm->mac_len = in->hard_header_len;
- }
+ } else
+ pm->mac_len = 0;
if (in)
strncpy(pm->indev_name, in->name, sizeof(pm->indev_name));
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* [2.4.20] Again with the __free_pages_ok oops
From: Jean-Philippe Grenier @ 2003-01-09 14:47 UTC (permalink / raw)
To: linux-kernel
I'm having this problem since I've updated from 2.2.16 to 2.4.18. A fix was
released by hch and Marcelo in 2.4.20, but I still have the problem using
2.4.20.
Please CC me in any response since I am not in the mailing list.
Here's the oops in 2.4.20:
-----------------------------------------
kernel BUG at page_alloc.c:100!
invalid operand: 0000
CPU: 0
EIP: 0010:[<c0132ba4>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010206
eax: 1a000000 ebx: c165bbfc ecx: c165bc18 edx: c1653a54
esi: 000001fc edi: 00000000 ebp: e4dd5458 esp: e41d9ee8
ds: 0018 es: 0018 ss: 0018
Process cc1 (pid: 854, stackpage=e41d9000)
Stack: c028f464 00026ff0 c100001c c165bc80 c028f3d4 c102c01c 00000217
fffffffe
00008ffa 0000001d 000001fc 00116000 e4dd5458 c012895f c165bbfc
00000114
08800000 e4825088 08696000 00000000 c0126ee0 c02eeda0 e4825084
08400000
Call Trace: [<c012895f>] [<c0126ee0>] [<c0129f5c>] [<c01170e6>]
[<c011c163>]
[<c011c3cf>] [<c01073e3>]
Code: 0f 0b 64 00 6d 63 25 c0 8b 6b 08 85 ed 74 08 0f 0b 66 00 6d
>>EIP; c0132ba4 <__free_pages_ok+44/340> <=====
>>eax; 1a000000 Before first symbol
>>ebx; c165bbfc <_end+131bb18/284bff7c>
>>ecx; c165bc18 <_end+131bb34/284bff7c>
>>edx; c1653a54 <_end+1313970/284bff7c>
>>ebp; e4dd5458 <_end+24a95374/284bff7c>
>>esp; e41d9ee8 <_end+23e99e04/284bff7c>
Trace; c012895f <zap_pte_range+1af/1ff>
Trace; c0126ee0 <zap_page_range+c0/170>
Trace; c0129f5c <exit_mmap+bc/120>
Trace; c01170e6 <mmput+56/a0>
Trace; c011c163 <do_exit+b3/2f0>
Trace; c011c3cf <sys_exit+f/10>
Trace; c01073e3 <system_call+33/40>
Code; c0132ba4 <__free_pages_ok+44/340>
00000000 <_EIP>:
Code; c0132ba4 <__free_pages_ok+44/340> <=====
0: 0f 0b ud2a <=====
Code; c0132ba6 <__free_pages_ok+46/340>
2: 64 00 6d 63 add %ch,%fs:0x63(%ebp)
Code; c0132baa <__free_pages_ok+4a/340>
6: 25 c0 8b 6b 08 and $0x86b8bc0,%eax
Code; c0132baf <__free_pages_ok+4f/340>
b: 85 ed test %ebp,%ebp
Code; c0132bb1 <__free_pages_ok+51/340>
d: 74 08 je 17 <_EIP+0x17>
Code; c0132bb3 <__free_pages_ok+53/340>
f: 0f 0b ud2a
Code; c0132bb5 <__free_pages_ok+55/340>
11: 66 data16
Code; c0132bb6 <__free_pages_ok+56/340>
12: 00 6d 00 add %ch,0x0(%ebp)
Here's the oops in 2.4.18-14
-----------------------------------------
kernel BUG at page_alloc.c:145!
invalid operand: 0000
CPU: 0
EIP: 0010:[<c0132a59>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010206
eax: 00000000 ebx: 01000000 ecx: c02e1280 edx: 00000000
esi: c1738bec edi: 00000000 ebp: c100000c esp: e413dec8
ds: 0018 es: 0018 ss: 0018
Process cc1 (pid: 13418, stackpage=e413d000)
Stack: c02e1354 c1738c54 c02e1280 c103400c 00000000 c02e1280 c0137aef
e3e12a30
e53ad630 0003e000 00100000 238d8067 c01288dd c1738bec 0000003f
40800000
e3538408 4064e000 00000000 c0126f10 c19abf20 e3538404 4054e000
00100000
Call Trace: [<c0137aef>] page_remove_rmap [kernel] 0x5f (0xe413dee0))
[<c01288dd>] zap_pte_range [kernel] 0xdd (0xe413def8))
[<c0126f10>] do_zap_page_range [kernel] 0x80 (0xe413df14))
[<c0127409>] zap_page_range [kernel] 0x49 (0xe413df48))
[<c0129ecb>] exit_mmap [kernel] 0xbb (0xe413df6c))
[<c011779d>] mmput [kernel] 0x2d (0xe413df94))
[<c011be8b>] do_exit [kernel] 0x9b (0xe413dfa0))
[<c011c05f>] sys_exit [kernel] 0xf (0xe413dfb8))
[<c0108d13>] system_call [kernel] 0x33 (0xe413dfc0))
Code: 0f 0b 91 00 e7 83 23 c0 8b 46 18 89 f9 83 e0 eb 89 f3 89 46
>>EIP; c0132a59 <__free_pages_ok+b9/320> <=====
>>ebx; 01000000 Before first symbol
>>ecx; c02e1280 <contig_page_data+100/440>
>>esi; c1738bec <_end+139d42c/284718a0>
>>ebp; c100000c <_end+c6484c/284718a0>
>>esp; e413dec8 <_end+23da2708/284718a0>
Trace; c0137aef <page_remove_rmap+5f/70>
Trace; c01288dd <zap_pte_range+dd/115>
Trace; c0126f10 <do_zap_page_range+80/100>
Trace; c0127409 <zap_page_range+49/80>
Trace; c0129ecb <exit_mmap+bb/150>
Trace; c011779d <mmput+2d/70>
Trace; c011be8b <do_exit+9b/240>
Trace; c011c05f <sys_exit+f/10>
Trace; c0108d13 <system_call+33/40>
Code; c0132a59 <__free_pages_ok+b9/320>
00000000 <_EIP>:
Code; c0132a59 <__free_pages_ok+b9/320> <=====
0: 0f 0b ud2a <=====
Code; c0132a5b <__free_pages_ok+bb/320>
2: 91 xchg %eax,%ecx
Code; c0132a5c <__free_pages_ok+bc/320>
3: 00 e7 add %ah,%bh
Code; c0132a5e <__free_pages_ok+be/320>
5: 83 23 c0 andl $0xffffffc0,(%ebx)
Code; c0132a61 <__free_pages_ok+c1/320>
8: 8b 46 18 mov 0x18(%esi),%eax
Code; c0132a64 <__free_pages_ok+c4/320>
b: 89 f9 mov %edi,%ecx
Code; c0132a66 <__free_pages_ok+c6/320>
d: 83 e0 eb and $0xffffffeb,%eax
Code; c0132a69 <__free_pages_ok+c9/320>
10: 89 f3 mov %esi,%ebx
Code; c0132a6b <__free_pages_ok+cb/320>
12: 89 46 00 mov %eax,0x0(%esi)
And here's my system info :
-----------------------------------------
[root@scavenger linux-2.4.20]# cat /proc/version
Linux version 2.4.20 (root@scavenger) (gcc version 3.2 20020903 (Red Hat
Linux 8.0 3.2-7)) #5 SMP Wed Jan 8 19:26:31 EST 2003
[root@scavenger linux-2.4.20]# sh ./scripts/ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
Linux scavenger 2.4.20 #5 SMP Wed Jan 8 19:26:31 EST 2003 i586 i586 i386
GNU/Linux
Gnu C 3.2
Gnu make 3.79.1
util-linux 2.11r
mount 2.11r
modutils 2.4.18
e2fsprogs 1.27
jfsutils 1.0.17
reiserfsprogs 3.6.2
PPP 2.4.1
Linux C Library 2.2.93
Dynamic linker (ldd) 2.2.93
Procps 2.0.7
Net-tools 1.60
Kbd 1.06
Sh-utils 2.0.12
Modules Loaded ipt_MASQUERADE iptable_nat ip_conntrack ppp_synctty
ppp_async ppp_generic slhc tulip iptable_filter ip_tables mousedev keybdev
input
[root@scavenger linux-2.4.20]# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 8
model name : AMD-K6(tm) 3D processor
stepping : 12
cpu MHz : 501.145
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow
k6_mtrr
bogomips : 999.42
[root@scavenger linux-2.4.20]# cat /proc/modules
ipt_MASQUERADE 2200 2 (autoclean)
iptable_nat 20504 1 (autoclean) [ipt_MASQUERADE]
ip_conntrack 28512 1 (autoclean) [ipt_MASQUERADE iptable_nat]
ppp_synctty 7872 0 (unused)
ppp_async 9504 1
ppp_generic 23296 3 [ppp_synctty ppp_async]
slhc 6684 0 [ppp_generic]
tulip 44160 2
iptable_filter 2316 1 (autoclean)
ip_tables 15224 5 [ipt_MASQUERADE iptable_nat iptable_filter]
mousedev 5400 0 (unused)
keybdev 2688 0 (unused)
input 5952 0 [mousedev keybdev]
[root@scavenger linux-2.4.20]# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02f8-02ff : serial(auto)
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
5000-50ff : VIA Technologies, Inc. VT82C586B ACPI
6400-640f : VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE
6400-6407 : ide0
6408-640f : ide1
6800-681f : VIA Technologies, Inc. USB
6800-681f : usb-uhci
6c00-6cff : Linksys Network Everywhere Fast Ethernet 10/100 model NC100
6c00-6cff : tulip
7000-70ff : Linksys Network Everywhere Fast Ethernet 10/100 model NC100 (#2)
7000-70ff : tulip
[root@scavenger linux-2.4.20]# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02f8-02ff : serial(auto)
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
5000-50ff : VIA Technologies, Inc. VT82C586B ACPI
6400-640f : VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE
6400-6407 : ide0
6408-640f : ide1
6800-681f : VIA Technologies, Inc. USB
6800-681f : usb-uhci
6c00-6cff : Linksys Network Everywhere Fast Ethernet 10/100 model NC100
6c00-6cff : tulip
7000-70ff : Linksys Network Everywhere Fast Ethernet 10/100 model NC100 (#2)
7000-70ff : tulip
[root@scavenger linux-2.4.20]# cat /proc/iomem
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-27feffff : System RAM
00100000-0024865c : Kernel code
0024865d-002c7dbf : Kernel data
27ff0000-27ff2fff : ACPI Non-volatile Storage
27ff3000-27ffffff : ACPI Tables
e0000000-e3ffffff : VIA Technologies, Inc. VT82C598 [Apollo MVP3]
e6000000-e6003fff : Matrox Graphics, Inc. MGA 1064SG [Mystique]
e7000000-e77fffff : Matrox Graphics, Inc. MGA 1064SG [Mystique]
e8000000-e87fffff : Matrox Graphics, Inc. MGA 1064SG [Mystique]
ea000000-ea0003ff : Linksys Network Everywhere Fast Ethernet 10/100 model
NC100 (#2)
ea000000-ea0003ff : tulip
ea001000-ea0013ff : Linksys Network Everywhere Fast Ethernet 10/100 model
NC100
ea001000-ea0013ff : tulip
ffff0000-ffffffff : reserved
[root@scavenger src]# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 661073920 656482304 4591616 0 69111808 450326528
Swap: 123367424 0 123367424
MemTotal: 645580 kB
MemFree: 4484 kB
MemShared: 0 kB
Buffers: 67492 kB
Cached: 439772 kB
SwapCached: 0 kB
Active: 64468 kB
Inactive: 447044 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 645580 kB
LowFree: 4484 kB
SwapTotal: 120476 kB
SwapFree: 120476 kB
[root@scavenger linux-2.4.20]# lspci -vvv
00:00.0 Host bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3] (rev 04)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 16
Region 0: Memory at e0000000 (32-bit, prefetchable) [size=64M]
Capabilities: [a0] AGP version 1.0
Status: RQ=7 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo
MVP3/Pro133x AGP] (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000f000-00000fff
Memory behind bridge: fff00000-000fffff
Prefetchable memory behind bridge: fff00000-000fffff
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C586/A/B PCI-to-ISA [Apollo
VP] (rev 47)
Subsystem: VIA Technologies, Inc. MVP3 ISA Bridge
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr-
Stepping+ SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE
(rev 06) (prog-if 8a [Master SecP PriP])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at 6400 [size=16]
00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 02) (prog-if 00
[UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 11
Region 4: I/O ports at 6800 [size=32]
00:07.3 Host bridge: VIA Technologies, Inc. VT82C586B ACPI (rev 10)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 9
00:0a.0 Ethernet controller: Linksys Network Everywhere Fast Ethernet 10/100
model NC100 (rev 11)
Subsystem: Linksys: Unknown device 0570
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (63750ns min, 63750ns max), cache line size 08
Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at 6c00 [size=256]
Region 1: Memory at ea001000 (32-bit, non-prefetchable) [size=1K]
Expansion ROM at e4000000 [disabled] [size=128K]
Capabilities: [c0] Power Management version 1
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0b.0 Ethernet controller: Linksys Network Everywhere Fast Ethernet 10/100
model NC100 (rev 11)
Subsystem: Linksys: Unknown device 0570
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (63750ns min, 63750ns max), cache line size 08
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at 7000 [size=256]
Region 1: Memory at ea000000 (32-bit, non-prefetchable) [size=1K]
Expansion ROM at e5000000 [disabled] [size=128K]
Capabilities: [c0] Power Management version 1
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0c.0 VGA compatible controller: Matrox Graphics, Inc. MGA 1064SG
[Mystique] (rev 02) (prog-if 00 [VGA])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping+ SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Interrupt: pin A routed to IRQ 10
Region 0: Memory at e6000000 (32-bit, non-prefetchable) [size=16K]
Region 1: Memory at e7000000 (32-bit, prefetchable) [size=8M]
Region 2: Memory at e8000000 (32-bit, non-prefetchable) [size=8M]
Expansion ROM at <unassigned> [disabled] [size=64K]
Jean-Philippe
_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=features/junkmail
^ permalink raw reply
* [PATCH] ipt_multiport invert fix
From: Harald Welte @ 2003-01-09 14:34 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 574 bytes --]
Hi Dave!
This is the first of a series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Marcus Sundberg <marcus@ingate.com>
This patch fixes the multiport match, when it is used in combination
with the invert (!) flag.
--
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
as I'm the dictator." -- George W. Bush Dec 18, 2000
[-- Attachment #1.2: ipt_multiport-invfix.patch --]
[-- Type: text/plain, Size: 658 bytes --]
diff -ur linux.current/net/ipv4/netfilter/ipt_multiport.c linux-mine/net/ipv4/netfilter/ipt_multiport.c
--- linux-2.4.19-rc1/net/ipv4/netfilter/ipt_multiport.c Tue Jun 20 23:32:27 2000
+++ linux/net/ipv4/netfilter/ipt_multiport.c Tue Jul 9 10:43:23 2002
@@ -78,7 +78,7 @@
/* Must specify proto == TCP/UDP, no unknown flags or bad count */
return (ip->proto == IPPROTO_TCP || ip->proto == IPPROTO_UDP)
- && !(ip->flags & IPT_INV_PROTO)
+ && !(ip->invflags & IPT_INV_PROTO)
&& matchsize == IPT_ALIGN(sizeof(struct ipt_multiport))
&& (multiinfo->flags == IPT_MULTIPORT_SOURCE
|| multiinfo->flags == IPT_MULTIPORT_DESTINATION
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply
* Re: [ANNOUNCE] Kernel Bug Database V1.10 on-line
From: John Bradford @ 2003-01-09 14:42 UTC (permalink / raw)
To: alexander.riesen; +Cc: mingo, linux-kernel
In-Reply-To: <20030109135241.GB12098@riesen-pc.gr05.synopsys.com>
> > > any reason why it has forced registration with a forced email address?
> >
> > Well, it was to discourage people posting stupid and/or rude comments
> > on it.
> >
> > > Makes it hard to just browse the bugs.
> >
> > Username: guest
> > Password: guest
> >
> > if you really don't want to register with it.
> >
>
> why login at all if one really just want to browse the bugs?
You're right - I'll fix it in the next version, (try again in a couple
of hours :-) ).
John.
^ permalink raw reply
* Re: [ANNOUNCE] Kernel Bug Database V1.10 on-line
From: John Bradford @ 2003-01-09 14:40 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: linux-kernel
In-Reply-To: <20030109134755.GE2529@lug-owl.de>
> > Version 1.10 of my kernel bug database is now on-line at:
> > http://grabjohn.com/kernelbugdatabase/
>
> > If the original submitter of a bug uploaded their config file, you can
> > download a config file with the same options set.
>
> What do I get? His/her config file, or some other?
No, you don't just get a copy of the original config file:
When a config file is uploaded to the system, it's parsed and the
actual config options are stored in a database. If comments are
present in a form that resembles what the existing kernel
configurators use to indicate different sections, then those comments
are used to categorise the config options in the database.
The main reason for this is so that if somebody reports a bug, and
includes their config information, a developer can select one of their
config options from a list, and indicate that the bug is triggered by
it.
Re-generating the config file from that database, so that somebody
else can download it was added as an afterthought :-). Comments are
re-inserted, as well as an additional comment showing which kernel
version the config was originally intended for.
> One can watch certain subsystems/drivers. That's a _really_ nice
> feature, and I'd even like to be notified if a file belonging to one of
> "my" choosen subsystems is to be changed on mainstream. However,
> choosing subsystems of interest isn't quite fun because of the entrie's
> order.
>
> I'd do this with three parts (within one list):
>
> ARCH - ALPHA
> ARCH - SPARC
> ARCH - ...
>
> Then important subsystems:
> FS-Core
> INIT
> NET
> NET-IPv4
> NET-IPv6
> NET-xxx
> PCI
> SCSI
> IDE
> =2E..
>
> =2E..and at last, I'd list all chooseable drivers:
> 3c509
> cpuid
> ACPI
> APM
> FS - AFS
> FS - EXT2
> FS - EXT3
> FS - codepages
> =2E..
Well, at the moment, the list is just generated from the MAINTAINERS
file, I didn't want to introduce my own grouping of things, but it
really depends on what people want.
I could add the ability to watch via config options as well as the
list of maintainers, would that be helpful?
> That would really ease finding the interesting parts. Where, for
> example, can I go for sparc?
Hmm, good point, there is only an UltraSPARC maintainer listed. The
problem is, this is a problem with the MAINTAINERS file that my
database has inherited - do we fix the MAINTAINERS file or my db?
John.
^ permalink raw reply
* [2.5 patch] remove KERNEL_VER from ftape.h
From: Adrian Bunk @ 2003-01-09 14:40 UTC (permalink / raw)
To: Linus Torvalds, claus, linux-tape; +Cc: linux-kernel
My patch that removed kernel 2.0 conpatibility code from
drivers/char/ftape/* included in 2.5.55 removed all usages of KERNEL_VER
but it is still #define'd in ftape.h.
The patch below removes this no longer needed #define.
I've tested the compilation with 2.5.55.
cu
Adrian
--- linux-2.5.55/include/linux/ftape.h.old 2003-01-09 15:27:41.000000000 +0100
+++ linux-2.5.55/include/linux/ftape.h 2003-01-09 15:34:46.000000000 +0100
@@ -30,9 +30,6 @@
#define FTAPE_VERSION "ftape v3.04d 25/11/97"
-/* this makes the Kernel version numbers readable */
-#define KERNEL_VER(major,minor,sublvl) (((major)<<16)+((minor)<<8)+(sublvl))
-
#ifdef __KERNEL__
#include <linux/interrupt.h>
#include <linux/mm.h>
^ permalink raw reply
* Re: "Mother" == "computer-illiterate"
From: Kent Borg @ 2003-01-09 14:35 UTC (permalink / raw)
To: Val Henson; +Cc: Miles Bader, dpaun, rms, lm, acahalan, linux-kernel
In-Reply-To: <20030109072043.GE26010@boardwalk>
On Thu, Jan 09, 2003 at 12:20:43AM -0700, Val Henson wrote:
> How come no one ever talks about a Linux distribution so easy that
> your grandfather could install it? Or a kernel configuration tool so
> simple that even Uncle Timmy can use it?
I am new to this thread, but I do use the "my mom" example because my
mother *is* the computer pioneer I know in that generation, but one
who still finds them difficult. She has been using computers since
she got a new Macintosh Plus and a 30 MB hard disk, and she has been
using e-mail since before it was clear to everybody that @-signs would
be a universal part of e-mail addresses. However, she is also still
not a computer wiz and I think never will be--there seems to be a
generational thing here, like learning a foreign language in
adulthood, that keeps computers hard. When my mother was a little
girl electricity was still new, and was useful for lighting.
My most recent e-mail from her was saying the some Apple support
person concluded her current problem is likely the Imac's hard drive
and to bring it into the store where she got it. (Her other Imac
works better, but it is only OS X and doesn't work with her scanner.)
She keeps at it!
My father only recently got interested in computers, uses the new Imac
for video editing, but refers all support questions to my mother. He
doesn't pretend to be self-sufficient on the topic.
> Can we quit with the "clueless mother" examples already?
My mother is far from clueless, but she is stubbornly resistant to
becoming a power user who can reliably solve her own problems. (The
fact that computers are still so damn buggy doesn't help either.)
I am encouraging them to get a DSL connection with a static IP, at
which point I will add a Linux computer to their collection--and I
will administer it remotely from 1000 miles away.
> My own mother has installed more distributions of Linux than I've
> even logged into.
I don't doubt that, but until computers get a lot easier to use and
administer the graphic image of the Clueless Mother is useful to shock
most geeks back to the reality that there *are* naive users. Many of
us have mothers, and computer expert mothers are still rare.
> I know quite a few mothers who have PhDs in CS, own several
> CS-related patents, and/or made important fundamental discoveries in
> CS.
(You hang out in rarified circles, the number of women in CSci id
dropping.)
So don't imagine a general purpose "have given birth human"! Imagine
a woman born in a modern western country, but 20 years before the
invention of the transistor. These capable women mastered impressive
things, but computers are so obtuse! And they are not the only ones
having trouble. I am still having trouble getting my software Raid 1
to boot off of either drive if one goes south--without opening the box
and pulling cables. And it seems like such a reasonable desire...
-kb, the Kent who insists that computers are more difficult than they
need be.
P.S. Some of us are old enough to remember when mice and graphical
interfaces were considered toys for beginners and not suitable to real
users. But at least then there was controversy! Now, overlapping
windows are the undoubted standard and no one even complains. These
traditions are too complicated, limited, and narrow, but it is hard to
think beyond them. But imagining a naive user (maybe even knowing one
or two) is a useful way to ask basic questions. If this naive user
isn't Your Mother, OK, but please don't forget that what is good for a
naive user (e.g., the mouse) is good for others too.
^ permalink raw reply
* Re: [linux-lvm] problem
From: Daniel Wittenberg @ 2003-01-09 14:26 UTC (permalink / raw)
To: linux-lvm
In-Reply-To: <20030108231014.I28021@uk.sistina.com>
Now this is interesting. I noticed that when I dumped the config, and
look at it, one of the (largest) pv's isn't showing up at all. I also
don't see a way to for vgcfgbackup to pull from a specific physical
device, so not sure how I can 'force' it to see the other lvm
partition. This is what I have now, but partition /dev/hdb1 is not
showing up. These are 2 partitions I used to move extents from failing
to disk before it completely died. I'm guessing this is why it doesn't
see the rest of the VG, very little right now isn't listed as "missing"
even those /dev/hdb1 is there, but vgscan doesn't seem to see it.
pv0 {
id = "YnfiRa-QnzV-Llio-quX6-UrHQ-WuCl-RiwZWd"
device = "/dev/hda7" # Hint only
status = ["ALLOCATABLE"]
pe_start = 8576
pe_count = 373 # 1.45703 Gigabytes
}
pv1 {
id = "qFNI3x-yIgQ-Lqco-PDNN-djJ4-UiWw-szmJiW"
device = "/dev/hda8" # Hint only
status = ["ALLOCATABLE"]
pe_start = 8576
pe_count = 444 # 1.73438 Gigabytes
}
Thanks again for all the help...definitely won't be using this across
disks not on RAID anymore...
Dan
On Wed, 2003-01-08 at 17:10, Alasdair G Kergon wrote:
> Procedure to follow:
>
> vgcfgbackup -P -f /tmp/vgbackup rootvg
>
> Edit the backup file as follows:
> Add "WRITE" to the status line and remove "PARTIAL"
>
> e.g.
> status = ["RESIZEABLE", "PARTIAL", "READ"]
> becomes
> status = ["RESIZEABLE", "READ", "WRITE"]
>
>
> Remove the whole PV section for your "unknown device"
> - referenced as "pv1" in this example.
>
> pv1 {
> id = "TBCgjx-ne5X-4fHP-aHqe-dKJR-Vwnb-kjDhWQ"
> device = "unknown device" # Hint only
>
> status = ["ALLOCATABLE"]
> pe_start = 128
> pe_count = 5 # 20 Megabytes
> }
>
>
> Remove the whole LV section for any LVs that refer to the pv you
> removed above (pv1 here referenced inside "stripes") e.g.
>
> tmp {
> id = "4eTLYv-PTDr-FXvv-58Xk-Q4Th-p8yi-GeKCHr"
> status = ["READ", "WRITE", "VISIBLE"]
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 3 # 12 Megabytes
>
> type = "striped"
> stripe_count = 1 # linear
>
> stripes = [
> "pv1", 0
> ]
> }
> }
>
> Write the metadata back to disk:
> vgcfgrestore -f /tmp/vgbackup rootvg
>
> Alasdair
--
===========================
Daniel Wittenberg
Senior Unix Admin
University of Iowa - ITS
^ permalink raw reply
* Re: netfilter and ipsec
From: Stefan Schlott @ 2003-01-09 14:21 UTC (permalink / raw)
To: ?e??; +Cc: netfilter-devel
In-Reply-To: <011101c2b7e6$69afb880$8365608c@kmlin>
Re-Hi,
> I am a new entrant in linux network security, and have tried to
> understand Netfilter and FreesWan.
> There is a question now confusing me so long. Why not integrating
> IPSec in the Netfilter architecture?
> Is there any reason that IPSec must exist as an device driver or
> some drawbacks to integrate??
I personally never touched the FreeSWAN-code, but I did the kernel part of
an IPsec-implementation for the IPv6 module about 2 years ago. So, this
statement is from an IPv6-point-of-view :-)
The main problem is the increasing size of a packet: It is possible to
modify packets in netfilter - as long as you don't increase the size.
Fragmentation is done somewhere else (in an earlier stage), so you have
to make sure that your IPsec-enriched packets do not exceed the (P)MTU.
If they do, this is your problem. If you don't care, the kernel will drop
the outgoing packet.
Of course, you could implement that, but this would void the performance
optimization done in the TCP code.
Inbound packets are not better: When netfilter gets hold of them, they are
still fragmented - afaik IPsec processing is done on the reassembled packets
(this makes sense: If a fragment is lost, some expensive cryptographic
operations would have been done in vain).
That's why I ended up patching the ipv6 module.
Well, as already mentioned - that was two years ago. If something has
changed, I'd be curious to know.
Stefan.
--
*--- please cut here... -------------------------------------- thanks! ---*
|-> E-Mail: stefan.schlott@informatik.uni-ulm.de PGP-Key: 0x2F36F4FE <-|
| The only secure Microsoft software is what's still shrink-wrapped in |
| their warehouse... |
| -- Richard Forno |
*-------------------------------------------------------------------------*
^ permalink raw reply
* Megaraid crash (Blocked mailbox......!!) with 2.4.19-aa and 2.4.20-aa
From: Pasi Kärkkäinen @ 2003-01-09 14:25 UTC (permalink / raw)
To: linux-kernel
Hello!
I've seen this at least 5 times now in one month.. One of our boxes die
when postgresql maintenance script AND backup cron jobs are ran at the same
time (by mistake - normally they are not ran at the same time)..
So it seems to be related to high disk i/o. The adapter is
HP NetRAID 1M with latest firmware. There is one RAID5 array with 3 disks
configured to it.
Usually this crash happens 1 to 2 times a week.. always when cron starts to
run the stuff at the night. The console will be flooded with "Blocked
mailbox......!!" text (which surprisingly means that the megaraid firmware
has stopped responding.. according to google)
This box doesn't have high disk i/o at the daytime, only at the night when
cron starts to do things..
When the cron jobs are not ran at the same time, the box is stable.
Other box using the same kind of adapter, but RAID1 array instead, having
high disk i/o all the time doesn't have any problems.. (with the same kernels).
Kernels are compiled with gcc 2.95.4 (Debian 3.0).
Any thoughts?
-- Pasi Kärkkäinen
^
. .
Linux
/ - \
Choice.of.the
.Next.Generation.
^ permalink raw reply
* [PATCH 2.4.21-pre3-bk RESEND 2] CREDITS update
From: Stelian Pop @ 2003-01-09 14:20 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi,
This patch updates my current CREDITS entry.
Marcelo, Alan, please apply.
(Alan, IIRC this was present in your 2.4.20-ac tree but I can't see
it anymore in 2.4.21-ac. Any reason why it get dropped ?)
Thanks,
Stelian.
===== CREDITS 1.64 vs edited =====
--- 1.64/CREDITS Mon Dec 30 18:23:57 2002
+++ edited/CREDITS Mon Jan 6 10:49:31 2003
@@ -2405,13 +2405,10 @@
D: CDROM driver "sonycd535" (Sony CDU-535/531)
N: Stelian Pop
-E: stelian.pop@fr.alcove.com
+E: stelian@popies.net
P: 1024D/EDBB6147 7B36 0E07 04BC 11DC A7A0 D3F7 7185 9E7A EDBB 6147
D: sonypi, meye drivers, mct_u232 usb serial hacks
-S: Alcôve
-S: 153, bd. Anatole France
-S: 93200 Saint Denis
-S: France
+S: Paris, France
N: Frederic Potter
E: fpotter@cirpack.com
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.