Only set link if not multicast

This commit is contained in:
Asim Aslam 2019-09-05 07:41:19 +01:00
parent d0761e0a1b
commit a1ba1482c5

View File

@ -855,10 +855,10 @@ func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
} }
t.RUnlock() t.RUnlock()
// discovered so set the link // discovered so set the link if not multicast
// TODO: pick the link efficiently based // TODO: pick the link efficiently based
// on link status and saturation. // on link status and saturation.
if c.discovered { if c.discovered && !c.multicast {
// set the link // set the link
i := rand.Intn(len(links)) i := rand.Intn(len(links))
c.link = links[i] c.link = links[i]