>
> I would use three of these sections, one with the serial number of each
> interface.  So:
>
> action "ifconfig $device-name name wan inet ..."
> action "ifconfig $device-name name dmz inet ..."
> action "ifconfig $device-name name lan inet ..."
>
> Then the interface names can be easily used in firewall settings.

I tried that as well, but $device-name is empty.

If I do this:

notify 1000 {
     match "system" "USB";
     match "subsystem" "INTERFACE";
     match "vendor" "0x0b95";
     match "product" "0x1790";
     match "sernum" "0000249B0DE00C";
     match "type" "ATTACH";
     action "logger DEVICE NAME IS: $device-name.";
};

I get:

<SNIP>
Dec  4 05:44:14 gateway1 kernel: ugen7.2: <ASIX Elec. Corp.> at usbus7
Dec  4 05:44:14 gateway1 kernel: axge0: <NetworkInterface> on usbus7
Dec  4 05:44:14 gateway1 devd: Executing 'logger DEVICE NAME IS: .!'
Dec  4 05:44:14 gateway1 martin: DEVICE NAME IS: .!
Dec  4 05:44:15 gateway1 kernel: miibus1: <MII bus> on axge0
Dec  4 05:44:15 gateway1 kernel: rgephy0: <RTL8169S/8110S/8211 1000BASE-T media 
interface> PHY 3 on miibus1
Dec  4 05:44:15 gateway1 kernel: rgephy0:  none, 10baseT, 10baseT-FDX, 
10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 
1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, 
auto-flow
Dec  4 05:44:15 gateway1 kernel: ue0: <USB Ethernet> on axge0
Dec  4 05:44:15 gateway1 kernel: ue0: Ethernet address: 00:24:9b:0d:e0:0c
Dec  4 05:44:15 gateway1 devd: Executing '/etc/pccard_ether ue0 start'
Dec  4 05:44:15 gateway1 kernel: ue0: link state changed to DOWN
</SNIP>

Notice the "Dec  4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part.
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to