All of lore.kernel.org
 help / color / mirror / Atom feed
* 'RTNETLINK answers: File exists' error
@ 2021-03-10  8:52 Marco Gaiarin
  2021-03-10 17:19 ` Grant Taylor
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marco Gaiarin @ 2021-03-10  8:52 UTC (permalink / raw)
  To: lartc


Sometime in my firewall (based on debian), using my custom script and
with policy routing enabled, i hit this error:

 ifup vlan191
 Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
 Added VLAN with VID = 191 to IF -:eth2:-
 RTNETLINK answers: File exists
 Failed to bring up vlan191.

this typically happen when i 'play' with an interface (eg, i tear it up
and down many times for testing); after a bit of play (but something
suddenly) the interface go into a undefined state; interface is up (eg,
'ifconfig' return the correct data) but routing is a mess.


Sometime the only thing to do is reboot the firewall.


Probably i do something wrong in my script, but... how can i 'cleanup'
the mess without rebooting?


Thanks.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
      http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'RTNETLINK answers: File exists' error
  2021-03-10  8:52 'RTNETLINK answers: File exists' error Marco Gaiarin
@ 2021-03-10 17:19 ` Grant Taylor
  2021-03-10 18:02 ` Marco Gaiarin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Taylor @ 2021-03-10 17:19 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

On 3/10/21 1:52 AM, Marco Gaiarin wrote:
> Sometime in my firewall (based on debian), using my custom script 
> and with policy routing enabled, i hit this error:
> 
>   ifup vlan191
>   Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
>   Added VLAN with VID == 191 to IF -:eth2:-
>   RTNETLINK answers: File exists
>   Failed to bring up vlan191.

That means that the kernel thinks that the route / interface that you 
are, or the script on your behalf is, trying to create already exists.

> this typically happen when i 'play' with an interface (eg, i tear it 
> up and down many times for testing); after a bit of play (but something 
> suddenly) the interface go into a undefined state; interface is up (eg, 
> 'ifconfig' return the correct data) but routing is a mess.

*nod*

Been there.
Done that.

> Sometime the only thing to do is reboot the firewall.

Na.  You generally shouldn't need to reboot.

> Probably i do something wrong in my script, but... how can i 'cleanup'
> the mess without rebooting?

In between script invocations, check to make sure that any VLAN 
interfaces you are messing with have been removed and that any Ethernet 
interfaces are down.

Doing that should remove any routes associated with them and remove the 
interfaces so that you / the script can start anew when creating them.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'RTNETLINK answers: File exists' error
  2021-03-10  8:52 'RTNETLINK answers: File exists' error Marco Gaiarin
  2021-03-10 17:19 ` Grant Taylor
@ 2021-03-10 18:02 ` Marco Gaiarin
  2021-03-12  9:44 ` Marco Gaiarin
  2021-03-12 17:40 ` Grant Taylor
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Gaiarin @ 2021-03-10 18:02 UTC (permalink / raw)
  To: lartc

Mandi! Grant Taylor
  In chel di` si favelave...

> >   RTNETLINK answers: File exists
> That means that the kernel thinks that the route / interface that you are,
> or the script on your behalf is, trying to create already exists.

Ok.


> > Probably i do something wrong in my script, but... how can i 'cleanup'
> > the mess without rebooting?
> In between script invocations, check to make sure that any VLAN interfaces
> you are messing with have been removed and that any Ethernet interfaces are
> down.
> Doing that should remove any routes associated with them and remove the
> interfaces so that you / the script can start anew when creating them.

As usual typically happen not on a testbed system, but in production,
but every time i've tried to deconfigure manually the interface (with
'ifconfig IFNAME down' or 'ip link delete IFNAME' nothing changed, eg
interface get correctly deconfigured, but subsequent 'ifup IFNAME' lead
to 'RTNETLINK answers: File exists'.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
      http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'RTNETLINK answers: File exists' error
  2021-03-10  8:52 'RTNETLINK answers: File exists' error Marco Gaiarin
  2021-03-10 17:19 ` Grant Taylor
  2021-03-10 18:02 ` Marco Gaiarin
@ 2021-03-12  9:44 ` Marco Gaiarin
  2021-03-12 17:40 ` Grant Taylor
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Gaiarin @ 2021-03-12  9:44 UTC (permalink / raw)
  To: lartc

Mandi! Justin Denick
  In chel di` si favelave...

> might be worth looking into ip route list

I suspect also a routing trouble.


> the "file" that exists might just be the default gw or some routing table added
> by the interface, but not removed when it was taken down.

OK, at least one time i was able to inspect carefully the routing
tables and filters and remove manually eventally crap laying around,
but still i get error.

There's some way to 'flush', cleanup, all the route for an interface,
but without interfere with others?

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
      http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'RTNETLINK answers: File exists' error
  2021-03-10  8:52 'RTNETLINK answers: File exists' error Marco Gaiarin
                   ` (2 preceding siblings ...)
  2021-03-12  9:44 ` Marco Gaiarin
@ 2021-03-12 17:40 ` Grant Taylor
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Taylor @ 2021-03-12 17:40 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

On 3/12/21 2:44 AM, Marco Gaiarin wrote:
> There's some way to 'flush', cleanup, all the route for an interface, 
> but without interfere with others?

Taking the interface down has always done that for me.

Any method suffices to take the interface down; ifconfig, ip, distro 
init scripts, removing the driver module, etc.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-12 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  8:52 'RTNETLINK answers: File exists' error Marco Gaiarin
2021-03-10 17:19 ` Grant Taylor
2021-03-10 18:02 ` Marco Gaiarin
2021-03-12  9:44 ` Marco Gaiarin
2021-03-12 17:40 ` Grant Taylor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.