datapath: Report ifindex of 0 if vport doesn't have one.
authorJesse Gross <jesse@nicira.com>
Wed, 29 Dec 2010 18:59:01 +0000 (10:59 -0800)
committerJesse Gross <jesse@nicira.com>
Thu, 30 Dec 2010 17:35:48 +0000 (09:35 -0800)
commit1cf7d1b80f1e88ffc533f32081a2ea3c48b1213e
treec51bf1fa7d556dee542aa3f65002b47aa4173ff8
parent633d3ac7dc4ac473a4e2a4f7bff32f3023b45cf6
datapath: Report ifindex of 0 if vport doesn't have one.

If a vport is a virtual device then it doesn't have a system ifindex.
We currently return the ifindex of the bridge device in this situation
but that's somewhat misleading, so this replaces it with 0.  Nothing
actually reads the ifindex for devices other than the bridge device,
so this doesn't have a functional change.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/vport.c