};
 
 enum {
-       NEXTHOP_GRP_TYPE_MPATH,  /* default type if not specified */
+       NEXTHOP_GRP_TYPE_MPATH,  /* hash-threshold nexthop group
+                                 * default type if not specified
+                                 */
+       NEXTHOP_GRP_TYPE_RES,    /* resilient nexthop group */
        __NEXTHOP_GRP_TYPE_MAX,
 };
 
        NHA_FDB,        /* flag; nexthop belongs to a bridge fdb */
        /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
 
+       /* nested; resilient nexthop group attributes */
+       NHA_RES_GROUP,
+       /* nested; nexthop bucket attributes */
+       NHA_RES_BUCKET,
+
        __NHA_MAX,
 };
 
 #define NHA_MAX        (__NHA_MAX - 1)
+
+enum {
+       NHA_RES_GROUP_UNSPEC,
+       /* Pad attribute for 64-bit alignment. */
+       NHA_RES_GROUP_PAD = NHA_RES_GROUP_UNSPEC,
+
+       /* u16; number of nexthop buckets in a resilient nexthop group */
+       NHA_RES_GROUP_BUCKETS,
+       /* clock_t as u32; nexthop bucket idle timer (per-group) */
+       NHA_RES_GROUP_IDLE_TIMER,
+       /* clock_t as u32; nexthop unbalanced timer */
+       NHA_RES_GROUP_UNBALANCED_TIMER,
+       /* clock_t as u64; nexthop unbalanced time */
+       NHA_RES_GROUP_UNBALANCED_TIME,
+
+       __NHA_RES_GROUP_MAX,
+};
+
+#define NHA_RES_GROUP_MAX      (__NHA_RES_GROUP_MAX - 1)
+
+enum {
+       NHA_RES_BUCKET_UNSPEC,
+       /* Pad attribute for 64-bit alignment. */
+       NHA_RES_BUCKET_PAD = NHA_RES_BUCKET_UNSPEC,
+
+       /* u16; nexthop bucket index */
+       NHA_RES_BUCKET_INDEX,
+       /* clock_t as u64; nexthop bucket idle time */
+       NHA_RES_BUCKET_IDLE_TIME,
+       /* u32; nexthop id assigned to the nexthop bucket */
+       NHA_RES_BUCKET_NH_ID,
+
+       __NHA_RES_BUCKET_MAX,
+};
+
+#define NHA_RES_BUCKET_MAX     (__NHA_RES_BUCKET_MAX - 1)
+
 #endif
 
        RTM_GETVLAN,
 #define RTM_GETVLAN    RTM_GETVLAN
 
+       RTM_NEWNEXTHOPBUCKET = 116,
+#define RTM_NEWNEXTHOPBUCKET   RTM_NEWNEXTHOPBUCKET
+       RTM_DELNEXTHOPBUCKET,
+#define RTM_DELNEXTHOPBUCKET   RTM_DELNEXTHOPBUCKET
+       RTM_GETNEXTHOPBUCKET,
+#define RTM_GETNEXTHOPBUCKET   RTM_GETNEXTHOPBUCKET
+
        __RTM_MAX,
 #define RTM_MAX                (((__RTM_MAX + 3) & ~3) - 1)
 };
 
        { RTM_NEWVLAN,          NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
        { RTM_DELVLAN,          NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
        { RTM_GETVLAN,          NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+       { RTM_NEWNEXTHOPBUCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+       { RTM_DELNEXTHOPBUCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
+       { RTM_GETNEXTHOPBUCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ  },
 };
 
 static const struct nlmsg_perm nlmsg_tcpdiag_perms[] =
                 * structures at the top of this file with the new mappings
                 * before updating the BUILD_BUG_ON() macro!
                 */
-               BUILD_BUG_ON(RTM_MAX != (RTM_NEWVLAN + 3));
+               BUILD_BUG_ON(RTM_MAX != (RTM_NEWNEXTHOPBUCKET + 3));
                err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms,
                                 sizeof(nlmsg_route_perms));
                break;