0

If I boot my system and no interface has an IP address I get the above output. However if I give an interface an IP, even if I remove it again, this will disappear. Why does this happen?

Is it that there is some file created that route tries to read?

  • You can probably figure out why by doing this: strace -s 2000 -o my.log route -n. – slm Oct 23 '14 at 15:09
  • @slm Thanks, i tried this, but it didn't give me anything useful – Paul Oct 24 '14 at 9:14
2

route reads /proc/net/route & route: fscanf appears on stderr.

Stream information from a configured interface:

# cat /proc/net/route
Iface   Destination Gateway     Flags   RefCnt  Use Metric  Mask        MTU Window  IRTT                                                       
eth0    00000000    02F7A8C0    0003    0   0   202 00000000    0   0   0                                                                             
eth0    00F7A8C0    00000000    0001    0   0   0   00FFFFFF    0   0   0  

The fscanf c++ function appears as an error from route because /proc/net/route is empty.

If you deconfigure the interface & bring it down again there is some initial information but no stream information:

# cat /proc/net/route
Iface   Destination Gateway     Flags   RefCnt  Use Metric  Mask        MTU Window  IRTT 

I test for this error in a script to check if interfaces should be configured.

  • Thanks that's perfect, my bad for figuring this out and forgetting to update this. – Paul Jun 30 '15 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.