Docker run with --bip option fails

Hello,

Docker version:
Version: 1.12.2
API version: 1.24
Go version: go1.7
Git commit: 8eab29e
OS/Arch: linux/amd64

Docker info:
Storage Driver: btrfs
Build Version: Btrfs v4.1.2+20151002
Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Security Options: apparmor
Kernel Version: 4.4.21-68-default
Operating System: SUSE Linux Enterprise Server 12 SP2
OSType: linux
Architecture: x86_64
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/

Issue:
docker config
/etc/sysconfig/docker
DOCKER_OPTS="–insecure-registry=0.0.0.0/0 –bip=127.12.7.1/24 --ip-forward=false --log-level=debug"

docker run -it --rm busybox /bin/sh

It fails with the following error:

docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:334: running prestart hook 0 caused "error running hook: exit status 1, stdout: , stderr: time="2016-11-27T20:51:30Z " level=fatal msg=“failed to set gateway while updating gateway: route for the gateway 127.12.7.1 could not be found: invalid argument”.

Note that using --bip=172.17.0.1/16 (which is default) or if I remove the --bip option shows no such issue.

Anyone has seen this or has a suggestion?

Thanks,
JH

Irrespective of your actual network configuration Linux seems to always return lo for routes to IPs in the network 127.0.0.0/8:

# ip route get 127.12.7.1
local 127.12.7.1 dev lo src 127.12.7.1 
    cache <local> 

# ip addr show lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/16 scope host lo
       valid_lft forever preferred_lft forever

# ip addr show br-d782a72d3a79
93: br-d782a72d3a79: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:9e:38:fb:27 brd ff:ff:ff:ff:ff:ff
    inet 127.12.7.1/16 brd 127.12.255.255 scope host br-d782a72d3a79
       valid_lft forever preferred_lft forever