iproute2 IPV6: ip route del succeeds but the route remains
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iproute (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
1) Ubuntu release: 11.10
2) Package:
iproute:
Installed: 20110315-1build1
Candidate: 20110315-1build1
Version table:
*** 20110315-1build1 0
500 http://
100 /var/lib/
3) In the following sequence, the second call to 'ip route del' should fail:
ip route add <IPV6> dev <ETH>
ping6 <IPV6>
ip route del <IPV6> dev <ETH>
ip route del <IPV6> dev <ETH>
4) Both calls to 'ip route del' succeed. The first one does not actually delete the route.
Below is a script that reproduces the problem:
#!/bin/sh
# A weird behavior of the ip command for IPV6
# First call to "route del" returns success but the route remains
start()
{
echo "START: ip route add $1 dev $2"
ip route add $1 dev $2
echo "RES=$?"
}
stop()
{
echo "STOP: ip route del $1 dev $2"
ip route del $1 dev $2
echo "RES=$?"
}
if [ $# -lt 2 ]
then
echo "Usage: $0 <IP_ADDR> <DEVICE>"
exit 0
fi
start $1 $2
ping6 $1 -c 1 -w 1
stop $1 $2
stop $1 $2
stop $1 $2
Can you run a matching "ip -6 route show <route>" between each run?
I suspect that what you're seeing is the kernel caching the route to the link local of your router, essentially duplicating the route in the table. That's fine and would match your symptoms.