Stefan Berger
2008-Jul-11 21:13 UTC
[Xen-devel] [PATCH] Choice of network interface for establishing a bridge on if NFSROOT is used
This patch fixes a problem related to machines that are booted using nfsroot ( ''/'' provided via nfs). Previously the code was assuming that nfsroot would be provided via eth0. Now this additional code checks over which interface the nfsroot is provided after detecting that nfsroot is actually being used. To determine from where nfsroot is mounted I am reading the kernel command line (/proc/cmdline) and filter for an argument starting with ''nfsroot='' and determine the nfs server''s IP address by assuming the format ''nfsroot=<ip adddress>:<path to root>'' - if there''s a better way of doing this, please let me know. After that I determine the interface over which this IP address would be accessed using ''ip route get <address>''. Then I compare that interface against a previously determined default interface and if they are equal return a value that causes an alternative interface to be chosen. Signed-off-by: Stefan Berger <stefanb@us.ibm.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel