Re: divert(4): increment divs_errors on if_get failure

2019-03-25 Thread Martin Pieuchot
On 24/03/19(Sun) 20:16, Lawrence Teo wrote: > This diff modifies divert_packet() to increment the divs_errors counter > on if_get failure so that users will be aware of it via netstat(1). If if_get(9) fails that means the interface no longer exists. Is it an error? Or a delayed free? Did we

divert(4): increment divs_errors on if_get failure

2019-03-24 Thread Lawrence Teo
This diff modifies divert_packet() to increment the divs_errors counter on if_get failure so that users will be aware of it via netstat(1). The same thing is done for divert6_packet(). While here, it also modifies divert_output() to move m_freem(m) below divstat_inc(divs_errors). This is purely