On 08/22/17 at 05:24pm, Dave Young wrote:
On 08/22/17 at 04:44am, Pingfan Liu wrote:
> > >
> > > After testing, I found: "ip route get to link-local addr" just
returns the
> > > default route-entry. It does not do some arp testing.
> > > We can observe the packet by tcpdump, in that case, there is no packet.
> > > Also given any invalid or non-exist link-local addr, the cmd always
return
> > > the default entry.
> > >
> > > To get the link-path for link-local addr, we should use "ip
neigh" cmd
> >
> > There are several ip route callback, should we fix all of them? Do we
> > have a simple way to do it?
> >
> I am not sure, but most likely we can not simplify it. "ip route" is based
on routing table.
> While "ip neigh" is based on neighbor's discovery protocol(L2
protocol), which means the peer should be on the switch.
> As for link-local addr, there is no subnet fields, I can not figure out how it is go
through routing table.
> Versa vice, the problem based on routing-table can not be resolved by L2 info.
Since link local is only local addresses, do we really need these ip
route callback? Maybe we can skip them?
For the static route issue, is it a problem for link local?
Baoquan, do you have idea?
I talked with Pingfan before about link lock, it should be the address
inside a local net which are connected by bridge. At least it's similar
in principal. Involve Leo and Xin Long to this thread, they are network
experts.
In bridge peers broadcast arp and get the related mac info and ip addr
and build the arp table, also named as neighbour table. In fact we seems
to haven't consider that either for ipv4 in the current kexec-tools scripts.
And as you said, up to now, no customers really dump to target within a local
network. For bridge, namely the layer two area, internally they don't
have route, just arp table and mac table. They only use route when they
need to communicate with outer area.
I think we can leave it as is for now. If really there are weirdos who
just want to deploy kdump inside a local area, we can reconsider them.
Thanks
Baoquan
> >
> > > dracut-module-setup.sh: _gateway=$(ip $_ipv6_flag route list dev
> > > $_netdev | \
> > > dracut-module-setup.sh: /sbin/ip $_ipv6_flag route show | grep -v
default
> > > | grep ".*via.* $_netdev " |\
> > > dracut-module-setup.sh:get_ip_route_field()
> > > dracut-module-setup.sh: _route=`/sbin/ip -o route get to $_server
2>&1`
> > > dracut-module-setup.sh: _srcaddr=$(get_ip_route_field
"$_route" "src")
> > > dracut-module-setup.sh: _netdev=$(get_ip_route_field "$_route"
"dev")
> > > dracut-module-setup.sh: netdev=$(/sbin/ip route get to ${tgt_ipaddr} |
\
> > >
> > >
> > [...]
>
> Thanks
> Dave