]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/iproute.c
ip: handle flush with table > 2^31
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 12 Feb 2013 19:41:46 +0000 (11:41 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 12 Feb 2013 19:42:57 +0000 (11:42 -0800)
commitcaae16b3b8f7ed609c701d732c03076187780644
tree922f5ea089fdb0e045277b6e4df7f3bfa7613a5a
parent6398d3a65277a2ebed085ad9deef15fea6f4ed09
ip: handle flush with table > 2^31

Fixes Debian bug #700434
Need to table id in filter to be unsigned to avoid conversion to -1

The documentation for "ip" suggests that, when using multiple routing tables, the table ID can be an arbitrary 32 bit number. I've been writing a script that calculates a table Id based on an IP addresses and sets up tables accordingly based on it. This seems to work for everything I've tried except "ip route flush". If you specify a table to flush with an ID over 2^31, it flushes all IPv4 routing tables. For example:

Will delete all routing tables, including the default one. Needless to say, this is quite annoying. I think this is an upstream bug, but your opinions will be greatly appreciated.
ip/iproute.c