telephony_supported = connection_check_feature_supported(FEATURE_TELEPHONY);
bt_tethering_supported = connection_check_feature_supported(FEATURE_BT_TETHERING);
ethernet_supported = connection_check_feature_supported(FEATURE_ETHERNET);
+ route_supported = connection_check_feature_supported(FEATURE_ROUTE);
if (telephony_supported == false && wifi_supported == false
- && bt_tethering_supported == false && ethernet_supported == false) {
+ && bt_tethering_supported == false && ethernet_supported == false
+ && route_supported == false) {
all_features_not_supported = true;
FPRINTF("[%s:%d] all feature is not supported\\n", __FILE__, __LINE__);
return ;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_add_route(connection, NULL, NULL);
CHECK_RETURN("connection_add_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_add_route(connection, interface_name, "192.168.129.3");
CHECK_RETURN("connection_add_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_remove_route(NULL, NULL, NULL);
CHECK_RETURN("connection_remove_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_remove_route(connection, interface_name, "192.168.129.3");
CHECK_RETURN("connection_remove_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_ipv6(NULL, NULL, NULL, NULL);
CHECK_RETURN("connection_add_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
CHECK_RETURN("connection_add_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_ipv6(NULL, NULL, NULL, NULL);
CHECK_RETURN("connection_remove_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
FREE_RESOURCE(interface_name);
CHECK_RETURN("connection_remove_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
{
int ret;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_entry(NULL, -1, NULL, NULL, NULL);
CHECK_RETURN("connection_add_route_entry", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_entry(connection, CONNECTION_ADDRESS_FAMILY_IPV6, interface_name, "2001:db8:1:0::1", "fe80::");
CHECK_RETURN("connection_add_route_entry", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_entry(NULL, -1, NULL, NULL, NULL);
CHECK_RETURN("connection_remove_route_entry", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_entry(connection, CONNECTION_ADDRESS_FAMILY_IPV6, interface_name, "2001:db8:1:0::1", "fe80::");
FREE_RESOURCE(interface_name);
CHECK_RETURN("connection_remove_route_entry", ret, CONNECTION_ERROR_NOT_SUPPORTED);