You are not logged in.

#1 2010-08-12 23:57:29

ernesto
Member
Registered: 2008-10-30
Posts: 21

Dynamic device woes, looking for any solution.

Hello,

I've hit a major roadblock here and I'm not sure how to get out of it. I'm running poptop (pptp server), and I'd like to create tc rules for each user that connects. The problem is, the network devices (ppp0, ppp1, ...) are created dynamically when the user connects, and tc won't let me use a device that does not yet exist.

Is there a way to poll for new network devices? Does anyone have an idea of other ways to solve this problem?

Offline

#2 2010-08-13 00:39:27

alexandrite
Member
Registered: 2009-03-27
Posts: 326

Re: Dynamic device woes, looking for any solution.

I don't know much about pptp, but if you just need something to add a file containing a ruleset or something, perhaps you could write a udev rule that creates the necessary tc rules when a new /dev/ppp* is added to the system?

Something like

KERNEL!="ppp[0-9]+", GOTO="end_ppp"

ACTION=="add", RUN+="tc-rule-adding-script"

ACTION=="remove", RUN+="cleanup-script"

LABEL="end_ppp"

Last edited by alexandrite (2010-08-13 00:46:33)

Offline

Board footer

Powered by FluxBB