David K. Bainbridge | d77028f | 2017-08-01 12:47:55 -0700 | [diff] [blame] | 1 | /* |
Joey Armstrong | 517afab | 2023-01-09 14:22:22 -0500 | [diff] [blame^] | 2 | * Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors |
David K. Bainbridge | d77028f | 2017-08-01 12:47:55 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
developer | e400c58 | 2020-03-24 19:42:08 +0100 | [diff] [blame] | 16 | package org.opencord.igmpproxy.impl; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 17 | |
| 18 | import org.onlab.packet.Ethernet; |
| 19 | import org.onlab.packet.IGMP; |
| 20 | import org.onlab.packet.IGMPMembership; |
| 21 | import org.onlab.packet.IGMPQuery; |
| 22 | import org.onlab.packet.IPv4; |
| 23 | import org.onlab.packet.Ip4Address; |
| 24 | import org.onlab.packet.MacAddress; |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 25 | import org.onlab.packet.VlanId; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 26 | import org.onosproject.net.DeviceId; |
| 27 | import org.onosproject.net.PortNumber; |
| 28 | import org.onosproject.net.flow.DefaultTrafficTreatment; |
| 29 | import org.onosproject.net.flow.TrafficTreatment; |
| 30 | import org.onosproject.net.packet.DefaultOutboundPacket; |
| 31 | import org.onosproject.net.packet.OutboundPacket; |
| 32 | import org.onosproject.net.packet.PacketService; |
Ilayda Ozdemir | 4c5947c | 2020-05-05 13:14:32 +0000 | [diff] [blame] | 33 | import org.opencord.igmpproxy.IgmpLeadershipService; |
Ilayda Ozdemir | 0872abd | 2020-06-03 20:20:20 +0300 | [diff] [blame] | 34 | import org.opencord.igmpproxy.IgmpStatisticType; |
developer | e400c58 | 2020-03-24 19:42:08 +0100 | [diff] [blame] | 35 | import org.opencord.igmpproxy.IgmpStatisticsService; |
Deepa Vaddireddy | ca7b25d | 2017-09-28 13:47:18 +0000 | [diff] [blame] | 36 | import org.slf4j.Logger; |
| 37 | import org.slf4j.LoggerFactory; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 38 | |
| 39 | import java.nio.ByteBuffer; |
| 40 | |
| 41 | /** |
| 42 | * Message encode and send interface for igmpproxy. |
| 43 | */ |
| 44 | public final class IgmpSender { |
| 45 | static final String V3_REPORT_ADDRESS = "224.0.0.22"; |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 46 | static final String V2_LEAVE_DST = "224.0.0.2"; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 47 | static final String MAC_ADDRESS = "DE:AD:BE:EF:BA:11"; |
| 48 | static final short DEFAULT_MVLAN = 4000; |
| 49 | static final byte DEFAULT_COS = 7; |
| 50 | static final int DEFAULT_MEX_RESP = 10; |
| 51 | static final byte[] RA_BYTES = {(byte) 0x94, (byte) 0x04, (byte) 0x00, (byte) 0x00}; |
| 52 | |
| 53 | private static IgmpSender instance = null; |
| 54 | private PacketService packetService; |
Ilayda Ozdemir | 4c5947c | 2020-05-05 13:14:32 +0000 | [diff] [blame] | 55 | private IgmpLeadershipService igmpLeadershipService; |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 56 | private IgmpStatisticsService igmpStatisticsService; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 57 | private boolean withRAUplink = true; |
| 58 | private boolean withRADownlink = false; |
| 59 | private short mvlan = DEFAULT_MVLAN; |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 60 | private short mvlanInner = VlanId.NONE.toShort(); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 61 | private byte igmpCos = DEFAULT_COS; |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 62 | private byte igmpUniCos = DEFAULT_COS; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 63 | private int maxResp = DEFAULT_MEX_RESP; |
Deepa Vaddireddy | ca7b25d | 2017-09-28 13:47:18 +0000 | [diff] [blame] | 64 | private Logger log = LoggerFactory.getLogger(getClass()); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 65 | |
Esin Karaman | 4a9075d | 2020-07-14 14:46:14 +0000 | [diff] [blame] | 66 | private IgmpSender(PacketService packetService, IgmpStatisticsService igmpStatisticsService) { |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 67 | this.packetService = packetService; |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 68 | this.igmpStatisticsService = igmpStatisticsService; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 69 | } |
| 70 | |
Esin Karaman | 4a9075d | 2020-07-14 14:46:14 +0000 | [diff] [blame] | 71 | public static void init(PacketService packetService, IgmpStatisticsService igmpStatisticsService) { |
| 72 | instance = new IgmpSender(packetService, igmpStatisticsService); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | public static IgmpSender getInstance() { |
| 76 | return instance; |
| 77 | } |
| 78 | |
| 79 | public void setWithRAUplink(boolean withRaUplink) { |
| 80 | this.withRAUplink = withRaUplink; |
| 81 | } |
| 82 | |
| 83 | public void setWithRADownlink(boolean withRADownlink) { |
| 84 | this.withRADownlink = withRADownlink; |
| 85 | } |
| 86 | |
| 87 | public void setMvlan(short mvlan) { |
| 88 | this.mvlan = mvlan; |
| 89 | } |
| 90 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 91 | public void setMvlanInner(short mvlanInner) { |
| 92 | this.mvlanInner = mvlanInner; |
| 93 | } |
| 94 | |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 95 | public void setIgmpCos(byte igmpCos) { |
| 96 | this.igmpCos = igmpCos; |
| 97 | } |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 98 | public void setIgmpUniCos(byte igmpUniCos) { |
| 99 | this.igmpUniCos = igmpUniCos; |
| 100 | } |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 101 | |
| 102 | public void setMaxResp(int maxResp) { |
| 103 | this.maxResp = maxResp; |
| 104 | } |
| 105 | |
| 106 | public Ethernet buildIgmpV3Join(Ip4Address groupIp, Ip4Address sourceIp) { |
| 107 | IGMPMembership igmpMembership = new IGMPMembership(groupIp); |
| 108 | igmpMembership.setRecordType(IGMPMembership.CHANGE_TO_EXCLUDE_MODE); |
| 109 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 110 | return buildIgmpPacket(IGMP.TYPE_IGMPV3_MEMBERSHIP_REPORT, groupIp, igmpMembership, |
| 111 | sourceIp, false, mvlan, mvlanInner, igmpCos); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 112 | } |
| 113 | |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 114 | public Ethernet buildIgmpV2Join(Ip4Address groupIp, Ip4Address sourceIp) { |
| 115 | IGMPMembership igmpMembership = new IGMPMembership(groupIp); |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 116 | return buildIgmpPacket(IGMP.TYPE_IGMPV2_MEMBERSHIP_REPORT, groupIp, igmpMembership, |
| 117 | sourceIp, true, mvlan, mvlanInner, igmpCos); |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 118 | } |
| 119 | |
| 120 | public Ethernet buildIgmpV2ResponseQuery(Ip4Address groupIp, Ip4Address sourceIp) { |
| 121 | return buildIgmpV2Join(groupIp, sourceIp); |
| 122 | } |
| 123 | |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 124 | public Ethernet buildIgmpV3ResponseQuery(Ip4Address groupIp, Ip4Address sourceIp) { |
| 125 | IGMPMembership igmpMembership = new IGMPMembership(groupIp); |
| 126 | igmpMembership.setRecordType(IGMPMembership.MODE_IS_EXCLUDE); |
| 127 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 128 | return buildIgmpPacket(IGMP.TYPE_IGMPV3_MEMBERSHIP_REPORT, groupIp, igmpMembership, |
| 129 | sourceIp, false, mvlan, mvlanInner, igmpCos); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | public Ethernet buildIgmpV3Leave(Ip4Address groupIp, Ip4Address sourceIp) { |
| 133 | IGMPMembership igmpMembership = new IGMPMembership(groupIp); |
| 134 | igmpMembership.setRecordType(IGMPMembership.CHANGE_TO_INCLUDE_MODE); |
| 135 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 136 | return buildIgmpPacket(IGMP.TYPE_IGMPV3_MEMBERSHIP_REPORT, groupIp, igmpMembership, |
| 137 | sourceIp, false, mvlan, mvlanInner, igmpCos); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 138 | } |
| 139 | |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 140 | public Ethernet buildIgmpV2Leave(Ip4Address groupIp, Ip4Address sourceIp) { |
| 141 | IGMPMembership igmpMembership = new IGMPMembership(groupIp); |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 142 | return buildIgmpPacket(IGMP.TYPE_IGMPV2_LEAVE_GROUP, groupIp, igmpMembership, |
| 143 | sourceIp, true, mvlan, mvlanInner, igmpCos); |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 144 | } |
| 145 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 146 | public Ethernet buildIgmpV2Query(Ip4Address groupIp, Ip4Address sourceIp, short vlan) { |
| 147 | return buildIgmpPacket(IGMP.TYPE_IGMPV3_MEMBERSHIP_QUERY, groupIp, null, |
| 148 | sourceIp, true, vlan, VlanId.NONE.toShort(), igmpUniCos); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 149 | } |
| 150 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 151 | public Ethernet buildIgmpV3Query(Ip4Address groupIp, Ip4Address sourceIp, short vlan) { |
| 152 | return buildIgmpPacket(IGMP.TYPE_IGMPV3_MEMBERSHIP_QUERY, groupIp, null, |
| 153 | sourceIp, false, vlan, VlanId.NONE.toShort(), igmpUniCos); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 154 | } |
| 155 | |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 156 | protected Ethernet buildIgmpPacket(byte type, Ip4Address groupIp, IGMPMembership igmpMembership, |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 157 | Ip4Address sourceIp, boolean isV2Query, short vlan, |
| 158 | short innerVlan, byte igmpCos) { |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 159 | |
| 160 | IGMP igmpPacket; |
| 161 | if (isV2Query) { |
| 162 | igmpPacket = new IGMP.IGMPv2(); |
| 163 | } else { |
| 164 | igmpPacket = new IGMP.IGMPv3(); |
| 165 | } |
| 166 | |
| 167 | IPv4 ip4Packet = new IPv4(); |
| 168 | Ethernet ethPkt = new Ethernet(); |
Esin Karaman | 45d2d6a | 2020-05-04 12:27:55 +0000 | [diff] [blame] | 169 | ethPkt.setPad(true); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 170 | |
| 171 | igmpPacket.setIgmpType(type); |
| 172 | |
| 173 | switch (type) { |
| 174 | case IGMP.TYPE_IGMPV3_MEMBERSHIP_QUERY: |
| 175 | igmpPacket.setMaxRespCode((byte) (maxResp * 10)); |
| 176 | IGMPQuery igmpQuery = new IGMPQuery(groupIp, 0); |
| 177 | |
| 178 | igmpPacket.addGroup(igmpQuery); |
| 179 | ip4Packet.setDestinationAddress(groupIp.toInt()); |
| 180 | if (withRADownlink) { |
| 181 | ip4Packet.setOptions(RA_BYTES); |
| 182 | } |
| 183 | break; |
| 184 | |
| 185 | case IGMP.TYPE_IGMPV3_MEMBERSHIP_REPORT: |
| 186 | if (igmpMembership == null) { |
Ilayda Ozdemir | 4c5947c | 2020-05-05 13:14:32 +0000 | [diff] [blame] | 187 | log.debug("Igmp membership is not found. igmp-type {} ", type); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 188 | return null; |
| 189 | } |
| 190 | igmpPacket.addGroup(igmpMembership); |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 191 | ip4Packet.setDestinationAddress(Ip4Address.valueOf(V3_REPORT_ADDRESS).toInt()); |
| 192 | |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 193 | if (withRAUplink) { |
| 194 | ip4Packet.setOptions(RA_BYTES); |
| 195 | } |
| 196 | break; |
| 197 | |
| 198 | case IGMP.TYPE_IGMPV2_MEMBERSHIP_REPORT: |
| 199 | case IGMP.TYPE_IGMPV2_LEAVE_GROUP: |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 200 | if (igmpMembership == null) { |
Ilayda Ozdemir | 4c5947c | 2020-05-05 13:14:32 +0000 | [diff] [blame] | 201 | log.debug("Igmp membership is not found. igmp-type {} ", type); |
Arjun E K | b0018fd | 2020-04-07 13:26:40 +0000 | [diff] [blame] | 202 | return null; |
| 203 | } |
| 204 | igmpPacket.addGroup(igmpMembership); |
| 205 | int dst = (type == IGMP.TYPE_IGMPV2_MEMBERSHIP_REPORT ? |
| 206 | groupIp.toInt() : |
| 207 | Ip4Address.valueOf(V2_LEAVE_DST).toInt()); |
| 208 | ip4Packet.setDestinationAddress(dst); |
| 209 | break; |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 210 | default: |
Ilayda Ozdemir | 4c5947c | 2020-05-05 13:14:32 +0000 | [diff] [blame] | 211 | log.debug("Unknown igmp type: {} ", type); |
Ilayda Ozdemir | 0872abd | 2020-06-03 20:20:20 +0300 | [diff] [blame] | 212 | igmpStatisticsService.increaseStat(IgmpStatisticType.UNKNOWN_IGMP_TYPE_PACKETS_RX_COUNTER); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 213 | return null; |
| 214 | } |
| 215 | |
| 216 | igmpPacket.setParent(ip4Packet); |
| 217 | ip4Packet.setSourceAddress(sourceIp.toInt()); |
| 218 | ip4Packet.setProtocol(IPv4.PROTOCOL_IGMP); |
| 219 | ip4Packet.setPayload(igmpPacket); |
| 220 | ip4Packet.setParent(ethPkt); |
| 221 | ip4Packet.setTtl((byte) 0x78); |
| 222 | |
| 223 | ethPkt.setDestinationMACAddress(multiaddToMac(ip4Packet.getDestinationAddress())); |
| 224 | ethPkt.setSourceMACAddress(MAC_ADDRESS); |
| 225 | ethPkt.setEtherType(Ethernet.TYPE_IPV4); |
| 226 | ethPkt.setPayload(ip4Packet); |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 227 | ethPkt.setVlanID(vlan); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 228 | ethPkt.setPriorityCode(igmpCos); |
| 229 | |
Esin Karaman | 586f1d6 | 2020-06-04 10:15:34 +0000 | [diff] [blame] | 230 | if (innerVlan != VlanId.NONE.toShort()) { |
| 231 | ethPkt.setQinQTPID(Ethernet.TYPE_VLAN); |
| 232 | ethPkt.setQinQVID(vlan); |
| 233 | ethPkt.setVlanID(innerVlan); |
| 234 | ethPkt.setQinQPriorityCode(igmpCos); |
| 235 | } |
| 236 | |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 237 | return ethPkt; |
| 238 | } |
| 239 | |
| 240 | private MacAddress multiaddToMac(int multiaddress) { |
| 241 | byte[] b = new byte[3]; |
| 242 | b[0] = (byte) (multiaddress & 0xff); |
| 243 | b[1] = (byte) (multiaddress >> 8 & 0xff); |
| 244 | b[2] = (byte) (multiaddress >> 16 & 0x7f); |
| 245 | byte[] macByte = {0x01, 0x00, 0x5e, b[2], b[1], b[0]}; |
| 246 | |
| 247 | MacAddress mac = MacAddress.valueOf(macByte); |
| 248 | return mac; |
| 249 | } |
| 250 | |
Esin Karaman | 00e16b7 | 2020-02-21 10:32:39 +0000 | [diff] [blame] | 251 | public void sendIgmpPacketUplink(Ethernet ethPkt, DeviceId deviceId, PortNumber upLinkPort) { |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 252 | if (IgmpManager.connectPointMode) { |
Deepa Vaddireddy | ca7b25d | 2017-09-28 13:47:18 +0000 | [diff] [blame] | 253 | if (IgmpManager.connectPoint == null) { |
| 254 | log.warn("cannot find a connectPoint to send the packet uplink"); |
| 255 | return; |
| 256 | } |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 257 | sendIgmpPacket(ethPkt, IgmpManager.connectPoint.deviceId(), IgmpManager.connectPoint.port()); |
| 258 | } else { |
Esin Karaman | 00e16b7 | 2020-02-21 10:32:39 +0000 | [diff] [blame] | 259 | sendIgmpPacket(ethPkt, deviceId, upLinkPort); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 260 | } |
| 261 | } |
| 262 | |
| 263 | public void sendIgmpPacket(Ethernet ethPkt, DeviceId deviceId, PortNumber portNumber) { |
Andrea Campanella | 2c70a57 | 2020-06-05 13:31:45 +0200 | [diff] [blame] | 264 | if (log.isTraceEnabled()) { |
| 265 | log.trace("Emitting on {}/{} outbound IGMP packet {}", deviceId, portNumber, ethPkt); |
| 266 | } |
| 267 | |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 268 | IPv4 ipv4Pkt = (IPv4) ethPkt.getPayload(); |
| 269 | IGMP igmp = (IGMP) ipv4Pkt.getPayload(); |
Ilayda Ozdemir | 37e8341 | 2020-12-19 14:54:27 +0000 | [diff] [blame] | 270 | // We are checking the groups. |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 271 | if ((igmp.getIgmpType() == IGMP.TYPE_IGMPV2_MEMBERSHIP_REPORT |
Ilayda Ozdemir | 37e8341 | 2020-12-19 14:54:27 +0000 | [diff] [blame] | 272 | || igmp.getIgmpType() == IGMP.TYPE_IGMPV3_MEMBERSHIP_REPORT |
| 273 | || igmp.getIgmpType() == IGMP.TYPE_IGMPV2_LEAVE_GROUP) && igmp.getGroups().isEmpty()) { |
| 274 | igmpStatisticsService.increaseStat(IgmpStatisticType.INVALID_IGMP_LENGTH); |
Sonal Kasliwal | f11c067 | 2020-03-18 11:11:50 +0000 | [diff] [blame] | 275 | } |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 276 | TrafficTreatment treatment = DefaultTrafficTreatment.builder() |
| 277 | .setOutput(portNumber).build(); |
| 278 | OutboundPacket packet = new DefaultOutboundPacket(deviceId, |
| 279 | treatment, ByteBuffer.wrap(ethPkt.serialize())); |
Ilayda Ozdemir | 0872abd | 2020-06-03 20:20:20 +0300 | [diff] [blame] | 280 | igmpStatisticsService.increaseStat(IgmpStatisticType.VALID_IGMP_PACKET_COUNTER); |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 281 | packetService.emit(packet); |
Andrea Campanella | 2c70a57 | 2020-06-05 13:31:45 +0200 | [diff] [blame] | 282 | if (log.isTraceEnabled()) { |
| 283 | log.trace("Emitted on {}/{} outbound IGMP packet {}", deviceId, portNumber, packet); |
| 284 | } |
ke han | 81a38b9 | 2017-03-10 18:41:44 +0800 | [diff] [blame] | 285 | |
| 286 | } |
| 287 | } |