> On April 15, 2014, 5:49 p.m., Cong Wang wrote: > > src/linux/routing/route.cpp, line 103 > > <https://reviews.apache.org/r/20347/diff/2/?file=557780#file557780line103> > > > > I don't quite understand the logic of your code. How do you check if > > this gateway is the default one? In libnl, it uses nl_addr_get_len(dst) == > > 0.
Cong, check the following function. The default gateway has destination == None() (which is essentially nl_addr_get_len(dst) == 0) :) - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20347/#review40419 ----------------------------------------------------------- On April 15, 2014, 1:35 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20347/ > ----------------------------------------------------------- > > (Updated April 15, 2014, 1:35 a.m.) > > > Review request for mesos, Benjamin Hindman, Chi Zhang, Ian Downes, Vinod > Kone, and Cong Wang. > > > Repository: mesos-git > > > Description > ------- > > See summary. I actually added the interface for getting the main routing > table. > > > Diffs > ----- > > src/Makefile.am 560b4c7 > src/linux/routing/route.hpp PRE-CREATION > src/linux/routing/route.cpp PRE-CREATION > src/tests/routing_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/20347/diff/ > > > Testing > ------- > > make check > > also manually verify output against the output from netstat -rn > > > Thanks, > > Jie Yu > >
