bgp: bug fix of Multi Exit Discriminator (MED)
bgp: bug fix of Multi Exit Discriminator (MED)

RyuBGP doesn't work well regarding the advertisement of BGP MED Attribute as follows.

(1) In spite of receiving BGP MED:"500" from iBGP(R2), RyuBGP can't advertise BGP MED:"100" to eBGP(R3).

    R1 -------------> R2 -------------> RyuBGP -------------> R3
       eBGP(MED:500)     iBGP(MED:500)    ^     eBGP(MED:500)
                                       (MED:100)

(2) When RyuBGP has received BGP MED:"200" from eBGP(R3), RyuBGP has sended BGP with missing-MED to iBGP(R2).
    As result, PolicyBaseRouting in R2(other RyuBGP) doesn't work properly becase of selecting wrong BestPath.

                   eBGP(MED:100)
    R1 ------------------------------------>+
                                            |
    R3 -------------> RyuBGP -------------> R2(RyuBGP) => Wrong result [BestPath is "R3-R2"]
       eBGP(MED:200)          iBGP(MED:N/A)

Signed-off-by: Toshiki Tsuboi <3612e803c7a6187f9767b9f153add7d8be62b078@gmail.com>
Signed-off-by: FUJITA Tomonori <93dac1fe9c4b2a3957982200319981492ad4976e@lab.ntt.co.jp>

habibiefaried/ryu,TakeshiTseng/ryu,fujita/ryu,Zouyiran/ryu,TakeshiTseng/ryu,osrg/ryu,jalilm/ryu,pichuang/ryu,ttsubo/ryu,pichuang/ryu,lsqtongxin/ryu,habibiefaried/ryu,takahashiminoru/ryu,fkakuma/ryu,ynkjm/ryu,gareging/SDN_Framework,sivaramakrishnansr/ryu,hisaharu/ryu,castroflavio/ryu,jalilm/ryu,gareging/SDN_Framework,jazzmes/ryu,StephenKing/ryu,TakeshiTseng/ryu,iwaseyusuke/ryu,gopchandani/ryu,fujita/ryu,jalilm/ryu,jalilm/ryu,OpenState-SDN/ryu,osrg/ryu,OpenState-SDN/ryu,zangree/ryu,Tesi-Luca-Davide/ryu,diogommartins/ryu,lsqtongxin/ryu,gopchandani/ryu,Zouyiran/ryu,OpenState-SDN/ryu,sivaramakrishnansr/ryu,lsqtongxin/ryu,elahejalalpour/ELRyu,osrg/ryu,StephenKing/ryu,Zouyiran/ryu,ysywh/ryu,hisaharu/ryu,takahashiminoru/ryu,ysywh/ryu,shinpeimuraoka/ryu,osrg/ryu,fkakuma/ryu,lagopus/ryu-lagopus-ext,StephenKing/ryu,diogommartins/ryu,zangree/ryu,evanscottgray/ryu,gopchandani/ryu,alanquillin/ryu,lagopus/ryu-lagopus-ext,openvapour/ryu,lsqtongxin/ryu,haniehrajabi/ryu,gareging/SDN_Framework,StephenKing/summerschool-2015-ryu,gopchandani/ryu,zyq001/ryu,yamt/ryu,habibiefaried/ryu,haniehrajabi/ryu,diogommartins/ryu,shinpeimuraoka/ryu,StephenKing/summerschool-2015-ryu,ynkjm/ryu,lagopus/ryu-lagopus-ext,gareging/SDN_Framework,pichuang/ryu,OpenState-SDN/ryu,John-Lin/ryu,openvapour/ryu,Tejas-Subramanya/RYU_MEC,jazzmes/ryu,zangree/ryu,darjus-amzn/ryu,hisaharu/ryu,diogommartins/ryu,lagopus/ryu-lagopus-ext,castroflavio/ryu,darjus-amzn/ryu,darjus-amzn/ryu,pichuang/ryu,pichuang/ryu,castroflavio/ryu,lagopus/ryu-lagopus-ext,fujita/ryu,umkcdcrg01/ryu_openflow,iwaseyusuke/ryu,Tesi-Luca-Davide/ryu,umkcdcrg01/ryu_openflow,ysywh/ryu,ttsubo/ryu,John-Lin/ryu,hisaharu/ryu,Zouyiran/ryu,elahejalalpour/ELRyu,ttsubo/ryu,ynkjm/ryu,habibiefaried/ryu,Tesi-Luca-Davide/ryu,darjus-amzn/ryu,fujita/ryu,fujita/ryu,John-Lin/ryu,openvapour/ryu,yamt/ryu,elahejalalpour/ELRyu,iwaseyusuke/ryu,ysywh/ryu,ttsubo/ryu,StephenKing/summerschool-2015-ryu,ynkjm/ryu,evanscottgray/ryu,habibiefaried/ryu,umkcdcrg01/ryu_openflow,umkcdcrg01/ryu_openflow,sivaramakrishnansr/ryu,StephenKing/summerschool-2015-ryu,StephenKing/summerschool-2015-ryu,lsqtongxin/ryu,John-Lin/ryu,openvapour/ryu,jalilm/ryu,yamt/ryu,John-Lin/ryu,ynkjm/ryu,elahejalalpour/ELRyu,zyq001/ryu,takahashiminoru/ryu,ttsubo/ryu,shinpeimuraoka/ryu,alanquillin/ryu,diogommartins/ryu,elahejalalpour/ELRyu,haniehrajabi/ryu,TakeshiTseng/ryu,iwaseyusuke/ryu,Tesi-Luca-Davide/ryu,iwaseyusuke/ryu,zyq001/ryu,jkoelker/ryu,darjus-amzn/ryu,gareging/SDN_Framework,takahashiminoru/ryu,takahashiminoru/ryu,fkakuma/ryu,jkoelker/ryu,zangree/ryu,yamt/ryu,hisaharu/ryu,fkakuma/ryu,zyq001/ryu,evanscottgray/ryu,sivaramakrishnansr/ryu,Tejas-Subramanya/RYU_MEC,yamt/ryu,haniehrajabi/ryu,Tejas-Subramanya/RYU_MEC,StephenKing/ryu,TakeshiTseng/ryu,jkoelker/ryu,fkakuma/ryu,zyq001/ryu,sivaramakrishnansr/ryu,gopchandani/ryu,StephenKing/ryu,alanquillin/ryu,alyosha1879/ryu,osrg/ryu,Zouyiran/ryu,alyosha1879/ryu,alanquillin/ryu,haniehrajabi/ryu,OpenState-SDN/ryu,umkcdcrg01/ryu_openflow,alyosha1879/ryu,ysywh/ryu,alyosha1879/ryu,zangree/ryu,shinpeimuraoka/ryu,shinpeimuraoka/ryu,openvapour/ryu,Tejas-Subramanya/RYU_MEC,alanquillin/ryu,jazzmes/ryu,Tejas-Subramanya/RYU_MEC,Tesi-Luca-Davide/ryu