Skip to contentSkip to conversation

loading modules at kernel startup

DISCUSSION linux lover 4 participants 5 messages Dec 21, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,
How to load own kernel modules just after eth0
interface is brought up?
I want to load kernel module as soon as networking part of kenrel starts. I dont want to loose any packets that travels on my linux machine.
regards,
linux_lover

#1 lore raw
Quoted 5 lines · linux lover

Hi all,
How to load own kernel modules just after eth0 interface is brought up?
I want to load kernel module as soon as networking part of kenrel starts.

Look at udev and hotplug

Quoted 2 lines

I dont want to loose any packets that travels on my linux machine.

You'll always loose something: there will be a gap between activating of the network interface and running of your module (or sniffer, as it sounds).

#2 lore raw

Hello Alex,
The kernel modules are netfilter modules that i wrote
and want to be loaded as soon as eth0 is up. Is there any way in kernel to add my modules and get it loaded at startup?
I actually added in .bashrc but modules are loaded with
every console i open but not once in system.
regards,
linux_lover

Quoted 16 lines · Alex Riesen
Quoted 5 lines · linux lover

Hi all,
How to load own kernel modules just after eth0 interface is brought up?
I want to load kernel module as soon as networking part of kenrel starts.

Look at udev and hotplug

Quoted 2 lines

I dont want to loose any packets that travels on my linux machine.

You'll always loose something: there will be a gap between activating of the network interface and running of your module (or sniffer, as it sounds).

#3 lore raw
In reply to Alex Riesen
Quoted 2 lines · Alex Riesen

On Tue, 21 Dec 2004 14:44:23 +0530, linux lover
<[email protected]> wrote:

[...]

Quoted 4 lines
Quoted 4 lines

How to load own kernel modules just after eth0 interface is brought up?
I want to load kernel module as soon as networking part of kenrel starts.

This usually depends on your distribution.

Quoted 7 lines

Look at udev and hotplug

Quoted 2 lines

I dont want to loose any packets that travels on my linux machine.

You'll always loose something: there will be a gap between activating of the network interface and running of your module (or sniffer, as it sounds).

Not if you do all on "activating the network interface" except "ip link set eth<x> up".
Usually this means patching your distributions network startup scripts and/or hooking in the firewall-rule-startup-script (where you basically have the same problem).

Bernd

Signature · 3 lines
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services
#4 lore raw
In reply to linux lover
Quoted 3 lines

Hi all,
How to load own kernel modules just after eth0
interface is brought up?

Possibly by loading them beforehand.

Quoted 3 lines

I want to load kernel module as soon as networking part of kenrel starts. I dont want to loose any packets that travels on my linux machine.

Jan Engelhardt

Signature · 1 line
ENOSPC