--- zzzz-none-000/linux-4.4.60/net/ipv6/af_inet6.c 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/net/ipv6/af_inet6.c 2018-11-08 13:36:17.000000000 +0000 @@ -64,6 +64,10 @@ #include #include +#ifdef CONFIG_AVM_PA +#include +#endif + MODULE_AUTHOR("Cast of dozens"); MODULE_DESCRIPTION("IPv6 protocol stack for Linux"); MODULE_LICENSE("GPL"); @@ -710,12 +714,24 @@ static int __init ipv6_packet_init(void) { +#ifdef CONFIG_AVM_PA + struct avm_pa_pid_cfg cfg; + snprintf(cfg.name, sizeof(cfg.name), "ipv6"); + cfg.framing = avm_pa_framing_ptype; + cfg.default_mtu = 0xffff; + cfg.ptype = &ipv6_packet_type; + if(avm_pa_dev_pid_register(AVM_PA_PTYPE_DEVINFO(&ipv6_packet_type), &cfg) < 0) + printk(KERN_ERR "%s: failed to register PA PID\n", cfg.name); +#endif dev_add_pack(&ipv6_packet_type); return 0; } static void ipv6_packet_cleanup(void) { +#ifdef CONFIG_AVM_PA + avm_pa_dev_unregister(AVM_PA_PTYPE_DEVINFO(&ipv6_packet_type)); +#endif dev_remove_pack(&ipv6_packet_type); }