Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678184 - net-misc/netifrc-0.6.1: WireGuard interfaces do not set mtu
Summary: net-misc/netifrc-0.6.1: WireGuard interfaces do not set mtu
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
Whiteboard: netifrc:wg
: 677940 (view as bug list)
Depends on:
Blocks: 662808
  Show dependency tree
Reported: 2019-02-16 23:06 UTC by tastytea
Modified: 2022-11-22 22:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description tastytea 2019-02-16 23:06:56 UTC
I wanted to change the mtu on a WireGuard interface. The setting "mtu_wg0" had no effect.

Reproducible: Always

Steps to Reproduce:
1. Configure wg0 as WireGuard interface in /etc/conf.d/net
2. Set mtu_wg0="1400"
3. start net.wg0
Actual Results:  
mtu is 1420

Expected Results:  
mtu is 1400

My config:

Comment 1 Ben Kohler gentoo-dev 2019-07-10 14:43:25 UTC
*** Bug 677940 has been marked as a duplicate of this bug. ***
Comment 2 Katherine Peeters 2021-07-19 22:03:13 UTC
I have the same issue on all of my Gentoo machines. Additionally, after a recent update (?) the MTU is no longer set correctly automatically, causing breakage. This means that every single time I boot any of my devices I have to log in as root and manually correct the MTU.

From what I can tell, netifrc is attempting to set the MTU before the interface has even been created, suggesting that this is not a Wireguard bug, but rather a netifrc bug. Either way, it's a problem...
Comment 3 tastytea 2021-07-20 09:28:17 UTC
Does the workaround from bug 677940 work for you? It works for me with netifrc 0.7.3.

postup() {
    case ${IFACE} in
            ip link set mtu 1400 dev ${IFACE}
Comment 4 lmk 2022-11-22 22:43:52 UTC
Alternative solution that works for me is changing wireguard_depend() function in /lib/netifrc/net/wireguard to:

    program /usr/bin/wg
    before interface