Callback that reply to a NS by sending a similar NS
(req, reply_mac, iface)
| 3658 | """ |
| 3659 | |
| 3660 | def ns_reply_callback(req, reply_mac, iface): |
| 3661 | """ |
| 3662 | Callback that reply to a NS by sending a similar NS |
| 3663 | """ |
| 3664 | |
| 3665 | # Let's build a reply and send it |
| 3666 | mac = req[Ether].src |
| 3667 | dst = req[IPv6].dst |
| 3668 | tgt = req[ICMPv6ND_NS].tgt |
| 3669 | rep = Ether(src=reply_mac) / IPv6(src="::", dst=dst) / ICMPv6ND_NS(tgt=tgt) # noqa: E501 |
| 3670 | sendp(rep, iface=iface, verbose=0) |
| 3671 | |
| 3672 | print("Reply NS for target address %s (received from %s)" % (tgt, mac)) |
| 3673 | |
| 3674 | _NDP_Attack_DAD_DoS(ns_reply_callback, iface, mac_src_filter, |
| 3675 | tgt_filter, reply_mac) |
nothing calls this directly
no test coverage detected