<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/src/etc/netplug/linkup.d, branch feature/T9082-codeql-cpp</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/vyos/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-1x.git/atom?h=feature%2FT9082-codeql-cpp</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-1x.git/atom?h=feature%2FT9082-codeql-cpp'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/'/>
<updated>2026-03-19T21:37:45+00:00</updated>
<entry>
<title>vyos-netlinkd: T8047: replace netplugd</title>
<updated>2026-03-19T21:37:45+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2025-11-07T21:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=b84bdbf8dd25995aa564081632de6251ecf5ad4e'/>
<id>urn:sha1:b84bdbf8dd25995aa564081632de6251ecf5ad4e</id>
<content type='text'>
Implementing a daemon that listens for netlink messages in Python was discussed
for many years. This is a proof-of-concept implementation how we can listen for
netlink messages and process them in Python.

Python 3.10 minimum is required due to the use of case statements which mimics
C-style switch/case instructions.

Add example:

 set interfaces ethernet eth1 vif 21 address dhcp
 set interfaces ethernet eth1 vif 21 address dhcpv6
 commit

If network cable is unplugged:

  vyos-netlinkd[12681]: RTM_NEWLINK -&gt; eth3.10, state=DOWN, mac=00:50:56:b3:9d:8e
  vyos-netlinkd[12681]: Stopping dhclient@eth3.10.service...
  vyos-netlinkd[12681]: Stopping dhcp6c@eth3.10.service...

If cable is plugged back in:

  vyos-netlinkd[12681]: RTM_NEWLINK -&gt; eth3.10, state=DOWN, mac=00:50:56:b3:9d:8e
  vyos-netlinkd[12681]: RTM_NEWLINK -&gt; eth3.10, state=UP, mac=00:50:56:b3:9d:8e
  vyos-netlinkd[12681]: Restarting dhclient@eth3.10.service...
  vyos-netlinkd[12681]: Restarting dhcp6c@eth3.10.service...
</content>
</entry>
<entry>
<title>netplug: T5476: rewrite dhclient helper from Perl -&gt; Python</title>
<updated>2023-08-16T11:22:14+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-08-15T10:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=1ab8166a5481c184ded9abf8da48dd0d391c8ae3'/>
<id>urn:sha1:1ab8166a5481c184ded9abf8da48dd0d391c8ae3</id>
<content type='text'>
There are two hooks called for bridge, ethernet and bond interfaces if the
link-state changes up -&gt; down or down -&gt; up.

The helpers are:
* /etc/netplug/linkdown.d/dhclient
* /etc/netplug/linkup.d/dhclient

As those helpers use Linux actions to start/restart the dhclient process in
Perl it's time to rewrite it. First goal is to get rid of all Perl code and the
second is that we now have a Proper Python library. Instead of checking if the
process is running the then restarting it without even systemd noticing
(yeah we might get two processes beeing alive) we should:

* Add a Python helper that can be used for both up and down (see man 8 netplugd
  FILES section)
* Query the VyOS CLI config if the interface in question has DHCP(v6)
  configured and is not disabled
* Add IPv6 DHCPv6 support

MAN page: https://linux.die.net/man/8/netplugd
</content>
</entry>
<entry>
<title>netplug: T3130: use Debian upstream version</title>
<updated>2020-12-14T17:50:34+00:00</updated>
<author>
<name>Christian Poessinger</name>
<email>christian@poessinger.com</email>
</author>
<published>2020-12-14T17:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=36eb1b34e9b9b048bf91a3236849f27d44287931'/>
<id>urn:sha1:36eb1b34e9b9b048bf91a3236849f27d44287931</id>
<content type='text'>
</content>
</entry>
</feed>
