[TASK] change default listing address to ff05::2:1001
take a look at: 59a44274cb
This commit is contained in:
parent
99443cb144
commit
31267858a6
@ -20,7 +20,7 @@ Yet another node info collector
|
||||
|
||||
## How it works
|
||||
|
||||
In the first step Yanic sends a multicast message to the group `ff02:0:0:0:0:0:2:1001` and port `1001`.
|
||||
In the first step Yanic sends a multicast message to the group `ff05:0:0:0:0:0:2:1001` and port `1001`.
|
||||
Recently seen nodes that does not reply are requested via a unicast message.
|
||||
|
||||
## Documentation
|
||||
|
@ -23,14 +23,14 @@ domains = ["city"]
|
||||
# name of interface on which this collector is running
|
||||
ifname = "br-ffhb"
|
||||
# ip address which is used for sending
|
||||
# (optional - without definition used a address of ifname)
|
||||
# (optional - without definition used a address of ifname - prefered link local)
|
||||
ip_address = "fd2f:5119:f2d::5"
|
||||
# disable sending multicast respondd request
|
||||
# (for receiving only respondd packages e.g. database respondd)
|
||||
#send_no_request = false
|
||||
# multicast address to destination of respondd
|
||||
# (optional - without definition used batman default ff02::2:1001)
|
||||
multicast_address = "ff05::2:1001"
|
||||
# (optional - without definition used default ff05::2:1001)
|
||||
#multicast_address = "ff02::2:1001"
|
||||
# define a port to listen
|
||||
# if not set or set to 0 the kernel will use a random free port at its own
|
||||
#port = 10001
|
||||
|
@ -52,7 +52,7 @@ synchronize = "1m"
|
||||
{% method %}
|
||||
How often send request per respondd.
|
||||
|
||||
It will send UDP packets with multicast address `ff02::2:1001` and port `1001`.
|
||||
It will send UDP packets with multicast address `ff05::2:1001` and port `1001`.
|
||||
If a node does not answer after the half time, it will request with the last know address under the port `1001`.
|
||||
{% sample lang="toml" %}
|
||||
```toml
|
||||
@ -110,7 +110,7 @@ ifname = "br-ffhb"
|
||||
{% method %}
|
||||
ip address is the own address which is used for sending.
|
||||
If not set or set with empty string it will take an address of ifname.
|
||||
(If `multicast_address` is not set the link local address otherwise a global unicast address)
|
||||
(It preferes the link local address, so at babel mesh-network it should be configurated)
|
||||
{% sample lang="toml" %}
|
||||
```toml
|
||||
ip_address = "fe80::..."
|
||||
@ -130,8 +130,8 @@ send_no_request = true
|
||||
### multicast_address
|
||||
{% method %}
|
||||
Multicast address to destination of respondd.
|
||||
If not set or set with empty string it will take the batman default multicast address `ff02::2:1001`
|
||||
(Needed in babel for a mesh-network wide routeable multicast addreess `ff05::2:1001`)
|
||||
If not set or set with empty string it will take the batman default multicast address `ff05::2:1001`
|
||||
(Needed to set for legacy `ff02::2:1001`)
|
||||
{% sample lang="toml" %}
|
||||
```toml
|
||||
multicast_address = "ff02::2:1001"
|
||||
|
@ -7,7 +7,7 @@ A little overview of yanic in connection with other software:
|
||||
|
||||
It sends the `gluon-neighbour-info` request and collects the answers.
|
||||
|
||||
It will send UDP packets with multicast address `ff02:0:0:0:0:0:2:1001` and port `1001`.
|
||||
It will send UDP packets with multicast address `ff05:0:0:0:0:0:2:1001` and port `1001`.
|
||||
|
||||
If a node does not answer, it will request with the last know address under the port `1001`.
|
||||
|
||||
|
@ -66,7 +66,7 @@ func (coll *Collector) listenUDP(iface InterfaceConfig) {
|
||||
if iface.IPAddress != "" {
|
||||
addr = net.ParseIP(iface.IPAddress)
|
||||
} else {
|
||||
addr, err = getUnicastAddr(iface.InterfaceName, iface.MulticastAddress == "")
|
||||
addr, err = getUnicastAddr(iface.InterfaceName)
|
||||
if err != nil {
|
||||
log.WithField("iface", iface.InterfaceName).Panic(err)
|
||||
}
|
||||
@ -99,7 +99,7 @@ func (coll *Collector) listenUDP(iface InterfaceConfig) {
|
||||
}
|
||||
|
||||
// Returns a unicast address of given interface (linklocal or global unicast address)
|
||||
func getUnicastAddr(ifname string, linklocal bool) (net.IP, error) {
|
||||
func getUnicastAddr(ifname string) (net.IP, error) {
|
||||
iface, err := net.InterfaceByName(ifname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -116,7 +116,7 @@ func getUnicastAddr(ifname string, linklocal bool) (net.IP, error) {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if (!linklocal && ipnet.IP.IsGlobalUnicast()) || (linklocal && ipnet.IP.IsLinkLocalUnicast()) {
|
||||
if (ip == nil && ipnet.IP.IsGlobalUnicast()) || ipnet.IP.IsLinkLocalUnicast() {
|
||||
ip = ipnet.IP
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
const (
|
||||
// default multicast group used by announced
|
||||
multicastAddressDefault = "ff02:0:0:0:0:0:2:1001"
|
||||
multicastAddressDefault = "ff05:0:0:0:0:0:2:1001"
|
||||
|
||||
// default udp port used by announced
|
||||
port = 1001
|
||||
|
Loading…
Reference in New Issue
Block a user