Re: [PATCH v2 1/5] A new object 'NMProxyConfig' with fields for proxy.

On Wed, Jul 27, 2016 at 09:00:12PM +0530, Atul Anand wrote:

I haven't tested this as i haven't a DHCP server with configured

Probably you can easily simulate it using a veth pair and dnsmasq in a
different namespace; something like:

  ip netns add ns1
  ip link add veth0 type veth peer name veth1
  ip link set veth1 netns ns1
  ip link set veth0 up
  ip -n ns1 link set veth1 up
  ip -n ns1 address add dev veth1

  ip netns exec ns1 \
        dnsmasq --no-hosts --keep-in-foreground --listen-address= \
        --dhcp-range=, -i veth1 --bind-interface \
        --dhcp-option=252,http://myhost.local/wpad.dat &

Then create the connection on veth0:

  nmcli connection add type ethernet ifname veth0 con-name veth0+
  nmcli connection up veth0+

But nm_proxy_config_merge_setting() is invoked in
dhcp4_config_changed(). So, Shouldn't we override the config
parameters with NMSettingProxy if the later one has been previously
set by user or by nm_proxy_config_create_setting() when connection
starts up.

Yeah, but the problem is when the setting has method=auto; in that
case the URL received through DHCP will be lost if I'm not mistaken.


Attachment: signature.asc
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]