summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
authorEiichiro Watanabe <a16tochjp@gmail.com>2015-10-14 16:28:11 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-14 21:59:56 +0900
commit0f56c9d00caf90c835a885b5c83778decc3885c6 (patch)
tree3ad87f79690ee794cd9a9226c4f74d6c864f6a6a /packet
parent577977900f447267c01026e516e6748e724e3540 (diff)
*: fix Errorf call with missing format verbs
Diffstat (limited to 'packet')
-rw-r--r--packet/bgp.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 69f74e0e..83d6a713 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1595,7 +1595,7 @@ func (er *EVPNMacIPAdvertisementRoute) DecodeFromBytes(data []byte) error {
if er.IPAddressLength == 32 || er.IPAddressLength == 128 {
er.IPAddress = net.IP(data[0:((er.IPAddressLength) / 8)])
} else if er.IPAddressLength != 0 {
- return fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
data = data[(er.IPAddressLength / 8):]
label1 := labelDecode(data)
@@ -1644,7 +1644,7 @@ func (er *EVPNMacIPAdvertisementRoute) Serialize() ([]byte, error) {
}
buf = append(buf, []byte(er.IPAddress)...)
} else {
- return nil, fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return nil, fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
for _, l := range er.Labels {
@@ -1697,7 +1697,7 @@ func (er *EVPNMulticastEthernetTagRoute) DecodeFromBytes(data []byte) error {
if er.IPAddressLength == 32 || er.IPAddressLength == 128 {
er.IPAddress = net.IP(data[:er.IPAddressLength/8])
} else {
- return fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
return nil
}
@@ -1723,7 +1723,7 @@ func (er *EVPNMulticastEthernetTagRoute) Serialize() ([]byte, error) {
}
buf = append(buf, []byte(er.IPAddress)...)
} else {
- return nil, fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return nil, fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
if err != nil {
return nil, err
@@ -1768,7 +1768,7 @@ func (er *EVPNEthernetSegmentRoute) DecodeFromBytes(data []byte) error {
if er.IPAddressLength == 32 || er.IPAddressLength == 128 {
er.IPAddress = net.IP(data[:er.IPAddressLength/8])
} else {
- return fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
return nil
}
@@ -1796,7 +1796,7 @@ func (er *EVPNEthernetSegmentRoute) Serialize() ([]byte, error) {
}
buf = append(buf, []byte(er.IPAddress)...)
} else {
- return nil, fmt.Errorf("Invalid IP address length", er.IPAddressLength)
+ return nil, fmt.Errorf("Invalid IP address length: %d", er.IPAddressLength)
}
return buf, nil
}
@@ -1840,7 +1840,7 @@ func getEVPNRouteType(t uint8) (EVPNRouteTypeInterface, error) {
case EVPN_ETHERNET_SEGMENT_ROUTE:
return &EVPNEthernetSegmentRoute{}, nil
}
- return nil, fmt.Errorf("Unknown EVPN Route type", t)
+ return nil, fmt.Errorf("Unknown EVPN Route type: %d", t)
}
const (